I often find this error “IndexError: index 0 is out of bounds for axis 0 with size 0”, especially when working with multiple arrays with Numpy and the same error can occur for those using Pandas when sending a Series or DataFrame to a numpy.array as with the following (Actually, Pandas is built on theContinue reading “IndexError: index 0 is out of bounds for axis 0 with size 0”
Author Archives: Danny Sibarani
How to Create PowerPoint presentation from Excel Data with Python
We’ll learn how to automate a PowerPoint presentation from Excel data using Python. Below picture illustrates what we’ll do in this project: The input for this project is an excel file with 2 sheets: First sheet name: KPI, that have 7 columns {Start Time, NE Name, Cell, RRC Connected User, Cell Traffic Volume DL(Gbits), DLContinue reading “How to Create PowerPoint presentation from Excel Data with Python”
How to create PowerPoint Presentation with Python
Before we start, please make sure to install python-pptx library. With python-pptx library, you can create/edit (add a slide, text, paragraph, table, and much more) a PowerPoint (.pptx) file, but remember this won’t work on MS Office 2003. Installation: Open the command prompt on your system and write the given below command: From this post,Continue reading “How to create PowerPoint Presentation with Python”
Create a chart from Excel data in Python with matplotlib
In this post, you will learn how to use Pandas, Matplotlib, and BytesIO to visualize the data from an Excel file. The step we need is below: Read Excel file with Pandas. In this part, you can use CReadExcel or (CExcelFile & CSheet) classes from the previous post “How to read excel (xls, xlsx) fileContinue reading “Create a chart from Excel data in Python with matplotlib”
How to read excel (xls, xlsx) files in python using pandas
Excel file is one of the most popular files in the world because it is easy and very instinctive and user-friendly which makes it ideal for manipulating large datasets even with less technical skill. And everyone who uses a computer at one time or the other has come across and worked with excel spreadsheets. ThisContinue reading “How to read excel (xls, xlsx) files in python using pandas”
Convert Jupyter file (.ipynb) to Python file (.py) and Python file (.py) to executable file (.exe)
The main objective of this post is to convert IPython Notebook file (.ipynb) to standalone, one-file Windows executables (.exe) with no need for the installer for client setup, should work plug and play, and be as small as possible. Below are the steps you need: You can use Notebook Menu to save the file directlyContinue reading “Convert Jupyter file (.ipynb) to Python file (.py) and Python file (.py) to executable file (.exe)”
Filter Excel Pivot Table with VBA
You can toggle the filter of PivotTable on and off from VBA code and change the value to whatever you like and “Refresh” the PivotTable. Here is how you can do it: Create a Pivot Table in VBA Let’s say you have below data sample: From excel data above create a pivot table “Insert ->Continue reading “Filter Excel Pivot Table with VBA”
Laravel Eloquent: has vs with vs whereHas?
with with() is for eager loading, it means the relationship data is loaded at the time you query the parent model, where eager loading will alleviate the “N+1” query problem. Example:User -> hasMany -> Post has has() is to filter the selecting model based on a relationship. So it acts very similarly to a normalContinue reading “Laravel Eloquent: has vs with vs whereHas?”
How to integrate Fontawesome with Nuxt.js
Integrate Fontawesome and Nuxt.js
Unit Testing Laravel: InvalidArgumentException, fail to locate factory classes (Unknown formatter)
Error: Unit-Test fail to locate factory class but running the same factory in tinker (no issue in tinker). For Laravel 6.8 or above, changes were made to “Unit-Test” to not loaded the framework anymore. So, if you need to use a “Factory” you should create a test within the “Feature-Test” directory or: use this (inContinue reading “Unit Testing Laravel: InvalidArgumentException, fail to locate factory classes (Unknown formatter)”