Skip to content

Instantly share code, notes, and snippets.

@SolClover
Created August 8, 2020 02:32
Show Gist options
  • Save SolClover/c387205c63d2c51d40d76d056638af04 to your computer and use it in GitHub Desktop.
Save SolClover/c387205c63d2c51d40d76d056638af04 to your computer and use it in GitHub Desktop.
Create Pandas DataFrame
# Initialise dictionary of lists
my_data = {'Col_A':['X', 'Y', 'Z'], 'Col_B':[2, 5, 12], 'Col_C':[3, 6, 13]}
# Create DataFrame
df = pd.DataFrame(my_data)
# Print DataFrame
df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment