Discuss different ways of creating a dataframe in python programming
languages using panda library. Justify your answer with the help of
suitable example
-Creating Dataframe from list of dicts
Creating a indexes DataFrame using arrays.
Example:
import pandas as pd
 Â
data = {'Student':['John', 'Robert', 'Lucy', 'Rachel'],
        'Scores':[100, 198, 195, 190]}
df = pd.DataFrame(data, index =['rank1', 'rank2', 'rank3','rank4'])
Comments
Leave a comment