1import pandas as pd
2
3data_dict = {'one': pd.Series([1, 2, 3], index=['a', 'b', 'c']),
4 'two': pd.Series([1, 2, 3, 4], index=['a', 'b', 'c', 'd'])}
5
6df = pd.DataFrame(data_dict)
7
8print(f"DataFrame:\n{df}\n")
9print(f"column types:\n{df.dtypes}")
10
11col_one_list = df['one'].tolist()
12
13col_one_arr = df['one'].to_numpy()
14
15print(f"\ncol_one_list:\n{col_one_list}\ntype:{type(col_one_list)}")
16print(f"\ncol_one_arr:\n{col_one_arr}\ntype:{type(col_one_arr)}")