
import pandas as pd

data = [{'a': 1, 'b': 2}, {'a': 5, 'b': 10, 'c': 20}]   # List of dict

df = pd.DataFrame(data)
print(df)
print(df.dtypes, "\n")

df = pd.DataFrame(data, index=['x','y'])
print(df)
print(df.dtypes, "\n")

df = pd.DataFrame(data, columns=['c','b','a'])
print(df)
print(df.dtypes, "\n")

df = pd.DataFrame(data, columns=['c','a'])
print(df)
print(df.dtypes, "\n")

