Say I have dataframe, c
:
a=np.random.random((6,2))
c=pd.DataFrame(a)
c.columns=['A','B']
printing row 0 values:
print c.loc[(0),:]
results in:
A 0.220170
B 0.261467
Name: 0, dtype: float64
I would like to suppress the Name: 0, dtype: float64
line so that I just get:
A 0.220170
B 0.261467
Does anyone know how?
(n.b. I am appending this to a text file)
Andy Hayden
来源:https://stackoverflow.com/questions/24295451/suppress-descriptive-output-when-printing-pandas-dataframe