Pandas basics tutorials
Pandas basics - tutorials helps understand basic functionality of Pandas
Make sure to keep the below packages updated and execute the pip's on your local system.
pip install pandas==1.1.2
pip install openpyxl==3.0.5
pip install xlrd==1.2.0
pip install hypothesis
pip install jupyterlab==3.0.0b4
pip install bottleneck
pip install numexpr
pip install python-dateutil
pip install pytz
pip install NumPy
pip install setuptools
pip install pytest
pip install BeautifulSoup4==4.9.1 --use-feature=2020-resolver
side notes: https://blog.python.org/2020/07/upgrade-pip-20-2-changes-20-3.html
——
Execute these commands: python -m pip install --upgrade pip, pip check and finally install your package using pip install —— installation dependency
https://pandas.pydata.org/docs/getting_started/install.htmlimport pandas as pd
import matplotlib.pyplot as plt
air_quality = pd.read_csv("day1/data/air_quality_no2.csv",index_col=0, parse_dates=True)
air_quality.head()
air_quality.plot()
air_quality["station_paris"].plot()
air_quality.plot.scatter(x="station_london",y="station_paris",alpha=0.5)
[method_name for method_name in dir(air_quality.plot) if not method_name.startswith("_")]
air_quality.plot.box()
axs = air_quality.plot.area(figsize=(12, 4), subplots=True)
fig, axs = plt.subplots(figsize=(12, 4));
air_quality.plot.area(ax=axs);
axs.set_ylabel("NO$_2$ concentration");
fig.savefig("no2_concentrations.png")
fig, axs = plt.subplots(figsize=(12, 4)) # Create an empty matplotlib Figure and Axes
air_quality.plot.area(ax=axs) # Use pandas to put the area plot on the prepared Figure/Axes
axs.set_ylabel("NO$_2$ concentration") # Do any matplotlib customization you like
fig.savefig("no2_concentrations.png") # Save the Figure/Axes using the existing matplotlib method.