could you help me to solve the following task, please?
My dataframe has the following content:
1 BEN
2 BIIB
3 BMY
4 COG
5 GPS
6 HAL
7 IPG
8 LLY
9 LOW
10 LUV
11 MRK
12 PSX
13 RMD
14 ROP
15 STT
16 UAA
I would like to save the dataframe df as a txt file. But I need the txt output in the following format (separated by commas):
BEN,BIIB,BMY,COG,GPS,HAL,IPG,LLY,LOW,LUV,MRK,PSX,RMD,ROP,STT,UAA
I tried to use:
dfnew = df.to_string(decimal=str)
But that is not the solution.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…