create a dictionary from index and column pandas

Solutions on MaxInterview for create a dictionary from index and column pandas by the best coders in the world

showing results for - "create a dictionary from index and column pandas"
Dimitri
02 Jan 2019
1import pandas as pd
2df = pd.DataFrame({'Name': ['John', 'Sara','Peter','Cecilia'],
3                   'Age': [38, 47,63,28],
4                  'City':['Boston', 'Charlotte','London','Memphis']})
5df
6