Skip to content

Instantly share code, notes, and snippets.

@pointonjoel
Last active Feb 24, 2021
Embed
What would you like to do?
# 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