Skip to content

Instantly share code, notes, and snippets.

@pratik-choudhari
Last active November 15, 2021 14:54
Show Gist options
  • Select an option

  • Save pratik-choudhari/e1a30d8ab257bdf99400400d005be384 to your computer and use it in GitHub Desktop.

Select an option

Save pratik-choudhari/e1a30d8ab257bdf99400400d005be384 to your computer and use it in GitHub Desktop.
pythonji code to create a pandas dataframe
import pandas as 🐼
# Define a dataframe and print it to the console
🐍 = 🐼.DataFrame(
{
"animal": ["Panda", "Python", "Lion"],
"πŸ˜€": ["🐼", "🐍", "🦁"],
"number": [1, 2, 3],
},
).set_index("πŸ˜€")
print(🐍)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment