Skip to content

Instantly share code, notes, and snippets.

@thepycoach
Created January 27, 2022 20:16
Show Gist options
  • Select an option

  • Save thepycoach/7c23a2d8af3bd506173acb99dc50a2a4 to your computer and use it in GitHub Desktop.

Select an option

Save thepycoach/7c23a2d8af3bd506173acb99dc50a2a4 to your computer and use it in GitHub Desktop.
names = ['L. Messi', 'Cristiano Ronaldo', 'Neymar Jr', 'J. Oblak', 'E. Hazard']
age = [32, 34, 27, 26, 28]
height_cm = [170, 187, 175, 188, 175]
nationality = ['Argentina', 'Portugal', 'Brazil', 'Slovenia', 'Belgium']
club = ['Paris Saint-Germain', 'Manchester United', 'Paris Saint-Germain', 'Atlético Madrid', 'Real Madrid']
df = pd.DataFrame(index=names, data={'age':age, 'height_cm':height_cm, 'nationality':nationality, 'club':club})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment