Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save paulmwatson/e06b77597173bea3ff221b8317912505 to your computer and use it in GitHub Desktop.
Save paulmwatson/e06b77597173bea3ff221b8317912505 to your computer and use it in GitHub Desktop.
import pandas
people = [['Nala', 'Cape Town'], ['Catherine', 'Johannesburg']]
pandas.DataFrame(people)
# => 0 1
# 0 Nala Cape Town
# 1 Catherine Johannesburg
pandas.DataFrame(people, columns = ['Name', 'City'])
# => Name City
# 0 Nala Cape Town
# 1 Catherine Johannesburg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment