Skip to content

Instantly share code, notes, and snippets.

@pointonjoel
Last active February 24, 2021 17:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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