Last active
February 12, 2018 07:57
-
-
Save g1039/ad35d58be0156d524a60cee4175a6de7 to your computer and use it in GitHub Desktop.
Learning Pandas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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