Last active
September 4, 2018 17:04
-
-
Save fcunhaneto/9305717e50c3c2a1996a28d24c16341a to your computer and use it in GitHub Desktop.
Pandas lendo arquivos .csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pl | |
import matplotlib.pyplot as plt | |
""" | |
Lendo um arquivo .csv com pandas e criando um pandas data frame | |
""" | |
dataframe = pl.read_csv('/home/francisco/Projects/Pycharm/matplot-pandas-tutorial' | |
'/files/annual-real-gnp-us-1909-to-1970.csv') | |
plt.figure(figsize=(8, 6)) | |
plt.plot(dataframe['Year'], dataframe['GNP']) | |
plt.xlabel('Year') | |
plt.ylabel('GNP') | |
plt.title('Annual Real USA GNP 1909 to 1970') | |
plt.savefig('annual-real-gnp-us-1909-to-1970.png') | |
plt.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment