Skip to content

Instantly share code, notes, and snippets.

@g1039
Last active February 12, 2018 07:57
Show Gist options
  • Save g1039/ad35d58be0156d524a60cee4175a6de7 to your computer and use it in GitHub Desktop.
Save g1039/ad35d58be0156d524a60cee4175a6de7 to your computer and use it in GitHub Desktop.
Learning Pandas
import pandas as pd
# Create empty dataframe
df = pd.DataFrame()
# Create a columns
a = ['A1', 'A2']
b = ['B1', 'B2']
c = ['C1', 'C2']
# View dataframe
df["A"] = a
df["B"] = b
df["C"] = c
df.index += 1 # start index at 1, not 0
print(df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment