📜  从 csv 和名称列 pandas 创建数据框 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:04.695000             🧑  作者: Mango

代码示例1
# create list and enter header values 
header_list = ["Val1", "Val2", "Val3"]
# create a dataframe ex: df and tell pandas to read in your csv
# in same line assign your list to the names=
df = pd.read_csv("sample_file.csv", names=header_list)