Skip to content

Instantly share code, notes, and snippets.

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