Quiz: Python Practice Problems: Parsing CSV Files
Practice parsing CSV files in Python with the csv module, generators, pytest, and pandas, and get ready to discuss your solutions in an interview.
Python in Excel, pandas, notebooks, PySpark and Python visuals across the data stack.
Practice parsing CSV files in Python with the csv module, generators, pytest, and pandas, and get ready to discuss your solutions in an interview.
Discover the key differences in Polars vs pandas to help you choose the right Python library for faster, more efficient data analysis.
Learn how to combine data in pandas with merge(), .join(), and concat(), and when to use each one to unify your Series and DataFrame objects.
Installation: To install this release, you must use a package manager like uv , pip , or conda , you can't install from source directly, see CLI: xlwings.exe is a standalone xlwings command-line client…
Installation: To install this release, you must use a package manager like uv , pip , or conda , you can't install from source directly, see CLI: xlwings.exe is a standalone xlwings command-line client…
Installation: To install this release, you must use a package manager like uv , pip , or conda , you can't install from source directly, see CLI: xlwings.exe is a standalone xlwings command-line client…
Installation: To install this release, you must use a package manager like uv , pip , or conda , you can't install from source directly, see CLI: xlwings.exe is a standalone xlwings command-line client…
Reading a CSV into a Python Pandas data frame? Before version 3.1, loading CSV was single-threaded and slow. My test file took 1.03s. In 3.1, it’s now multi-threaded and much faster, taking 252 ms. However, it’s still…
My students used to ask if Python Pandas supports 3D data structures. Answer: No. Series are 1D and data frames are 2D. But… a multi-index effectively gives you more dimensions. You can then navigate the indexes with…
Follow this NumPy tutorial to learn how to create and manipulate arrays in Python and take your first steps into data science.
There are tons of config options in Python Pandas. Set them with pd.set_option: pd.set_option('display.precision', 2) Now floats in a series or data frame will have 2 digits after the decimal. Retrieve the value with…
Starting with Python Pandas 3.1, use “filter” to apply a condition to rows. So: ( df .loc[ pd.col('passenger_count') > 1 , 'trip_distance'] .mean() ) can now be (the much slower): ( df .filt…
To remove a level from a Python Pandas multi-index, use droplevel: – “level” kwarg takes an int or string – “axis” kwarg can be “index” or “columns” — or use 0 or 1, but I prefer the names Returned data frame has the…
What does a Python Pandas data frame’s multi-index look like? This: MultiIndex([(0.0, 1), (1.0, 1), (2.0, 1), (3.0, 1), (4.0, 1), (5.0, 1), (6.0, 1)], names=['passenger_count', 'VendorID']) The post Pandas MultiIndex…
Using xs on a multi-indexed Python Pandas data frame drops the named level — unless you use drop_level=False: ( pd .read_parquet('taxi_2025-11.parquet') .groupby(['passenger_count', 'VendorID'])['total_amount'].mean()…
Test your understanding of Python plotting with matplotlib, from Figure and Axes objects to subplots, pandas plotting, and styling.
To retrieve all rows from a multi-indexed Python Pandas data frame or series based on the outermost index, use “loc”: ( pd .read_parquet('/Users/reuven/Data/nyc_taxi_2025-11.parquet') .groupby(['passenger_count'…
Want to retrieve specific columns from your Python Pandas data frame? In the past, you would say df[['x', 'y']] But now, with version 3.1, you can use the “select” method: df.select('x', 'y') The post Pandas 3.1…
Using xs to retrieve from a Python Pandas multi-index? “level” takes an int or string: – int: The index level, with 0 the outermost – string: The level’s name — but not every level has one The name is clearer, but…
The Fabric Notebook Toolkit (Preview) helps developers shorten the feedback loop between writing code and validating it with live notebook results. It connects coding agents to Microsoft Fabric notebooks through a…