Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Docs?
  • Loading branch information
LoganLieou authored Oct 19, 2019
commit 9e383497c06def312f992381db618d90c729b7d6
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)