Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

create a dictionary from index and column pandas

import pandas as pd
df = pd.DataFrame({'Name': ['John', 'Sara','Peter','Cecilia'],
                   'Age': [38, 47,63,28],
                  'City':['Boston', 'Charlotte','London','Memphis']})
df
Source by kanoki.org #
 
PREVIOUS NEXT
Tagged: #create #dictionary #index #column #pandas
ADD COMMENT
Topic
Name
5+3 =