We can create a DataFrame using following ways:
Lists
Dict of ndarrays
Example-1: Create a DataFrame using List:
importpandas as pd
# a list of strings
a = [‘Python’, ‘Pandas’]
# Calling DataFrame constructor on list
info = pd.DataFrame(a)
print(info)