/python_basics_ex5 Secret
Last active
February 24, 2021 17:31
Star
You must be signed in to star a gist
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
# Example 5 | |
#pip install xlrd # Installing dependancy | |
import pandas as pd # Importing pandas package | |
import numpy as np # Importing numpy package | |
df = pd.read_excel('PAYEMS21.xls', header=10) # Loading data | |
# Renaming and Indexing | |
df = df.rename(columns={'observation_date': 'date', 'PAYEMS': 'values'}) # Renaming columns | |
df.set_index("date",inplace=True) # Setting Index | |
print(df) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment