Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
YStrano
GitHub Repository: YStrano/DataScience_GA
Path: blob/master/lessons/lesson_12/python-notebooks-data-wrangling/Visualization -- Learning to use pandas and DataFrames with matplotlib.ipynb
1904 views
Kernel: Python 3

Pandas and Matplotlib

# same ol boilerplate, except no csv.DictReader from os import makedirs from os.path import join %matplotlib inline import matplotlib.pyplot as plt # but now we got some pandas import pandas as pd DATA_FILENAME = join('data', 'climate', 'extracted', 'nasa-ghgases-co2-mean.csv') IMAGES_DIR = join('images', 'climate') makedirs(IMAGES_DIR, exist_ok=True)

Importing data via pandas readers

# Handy built-in output for notebooks df = pd.read_csv(DATA_FILENAME) ## note the indexes df.head()
df.iloc[2:4]