Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Create Pandas DataFrame

import pandas as pd

boxes = {'Color': ['Green','Green','Green','Blue','Blue','Red','Red','Red'],
         'Shape': ['Rectangle','Rectangle','Square','Rectangle','Square','Square','Square','Rectangle']
        }
df = pd.DataFrame(boxes, columns = ['Color', 'Shape'])

print(df)
Source by datatofish.com #
 
PREVIOUS NEXT
Tagged: #Create #Pandas #DataFrame
ADD COMMENT
Topic
Name
8+2 =