Create a Duration Column in PandasAre you working with a pandas dataset that has two datetime columns and you want to know the […] October 12, 2023 in Python tagged date / time / duration / pandas / difference by Mike
Statsmodels in Pythonstatsmodels is a Python library for fitting many kinds of statistical models, performing statistical tests, and data exploration […] September 1, 2023 in Python tagged ols / library / regression / stats by Mike
Filter Out Missing Data in PandasThere are a few ways to filter out missing data in Python. When we talk about filtering data […] September 1, 2023 in Python tagged filter / missing / NA / dropna / nulls / data / drop_na / delete / remove / drop / null by Mike
Google ColabWhat is Google Colab? Google Colab is a cloud-based service that allows you to write and run code […] August 27, 2023 in Python tagged Google / colab by Mike
Python in ExcelPython is now inside Microsoft Excel. Really? Python is only in Excel if you have Microsoft 365 on […] August 27, 2023 in Excel / Python tagged python / excel by Mike
Rename a DataFrame Column in PythonAs a data professional do you have a Python dataset that might require some column renaming? Why would […] August 5, 2023 in Python tagged snake / rename / pandas / dataframe / case / unnamed / column / inplace / name / friends / update / renaming / python / field / change by Mike
Reorder pandas DataFrame ColumnsTo reorder columns in a Pandas DataFrame, pass into the DataFrame a list of column names in the […] August 5, 2023 in Python tagged pandas / dataframe / reorder / drop / sequence / select / columns / pandas DataFrame by Mike
Groupby Multiple ColumnsHow do you take a pandas DataFrame of data (dataset) and produce a multi-column bar chart? You can […] August 4, 2023 in Python tagged pandas / aggregate / groupby / column / seaborn / chart / matplotlib / bar / barplot / graph / group / by / plot / Pandas EDA Structuring by Mike
Apply a Custom Function to a DataFrameHow do we apply a custom Python function to a column in a pandas DataFrame? Here we’ll use […] August 3, 2023 in Python tagged lambda / tqdm / add / column / apply / bar / progress / series / custom / dataframe / function / strip / new / assign by Mike
Python Find Nth Occurrence of Char in a StringIn Python, how would you find the Nth occurrence of a character (or substring) in a string? Yes, […] August 3, 2023 in Python tagged char / string / python / substring / nth / occurrence / locate / find by Mike
Change String Case in pandasThere are several ways to change the case in a pandas String. There is upper, lower, title, capitalize […] August 3, 2023 in Python tagged string / case / upper / series / str / lower / title capitalize / swap by Mike
Sorting a pandas DataFrameYou can sort a pandas DataFrame by one or multiple (one or more) columns using sort_values() method and […] August 2, 2023 in Python tagged sort / sorting / multiple / columns / pandas / dataframe / ascending / descending / pandas DataFrame by Mike