[英]Printing pandas df without column name
I've been trying to open a.csv, read it in pandas, and print it without the column name.我一直在尝试打开 a.csv,在 pandas 中读取它,并在没有列名的情况下打印它。 The code I have我的代码
df = pd.read_csv(filepath_or_buffer='C:/Users/R2/Documents/Desktop/Programing/Bot/list.csv')
rows = df.loc[[i]]
values = rows.to_string(index = False)
print(values)
Outputs something like this输出像这样
Value
12343
How would I make it so values equal only 12343 and not Value 12343我如何才能使值仅等于 12343 而不是值 12343
Try:尝试:
values = rows.to_string(index = False, header=False)
print(values)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.