Skip to content

Commit

Permalink
Docs? (codebasics#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
LoganLieou authored Feb 23, 2020
1 parent 5e7277f commit 7b10130
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Modules/pandas_tutorial.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
"""
Introducing pandas using namespace pd,
such that you can call pandas class using pd instead of pandas.
"""

import pandas as pd

# Dict object, with arbitrary data.
stats = {
'Month': ['Jan', 'Feb', 'March', 'April'],
'Expenses': [2350, 3400, 2700, 2200],
'Income': [4000, 4000, 4000, 4000]
}

# stats is now a pandas data frame object.
df = pd.DataFrame(stats)
# df = df.set_index('Month')
print(df.Month)
print(df.Month)

0 comments on commit 7b10130

Please sign in to comment.