Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/306.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何隐藏熊猫数据框中显示序列号的第一列_Python_Python 3.x_Pandas_Dataframe - Fatal编程技术网

Python 如何隐藏熊猫数据框中显示序列号的第一列

Python 如何隐藏熊猫数据框中显示序列号的第一列,python,python-3.x,pandas,dataframe,Python,Python 3.x,Pandas,Dataframe,我有一个数据帧 df = pd.DataFrame({'B': [1, 2, 3], 'C': [4, 5, 6]}) B C 0 1 4 1 2 5 2 3 6 我想隐藏序列号列。如何接近?您可以: print(df.to_string(index=False)) 这回答了你的问题吗?

我有一个数据帧

df = pd.DataFrame({'B': [1, 2, 3], 'C': [4, 5, 6]})

   B  C
0  1  4
1  2  5
2  3  6
我想隐藏序列号列。如何接近?

您可以:

print(df.to_string(index=False))

这回答了你的问题吗?