我如何在第2列中移动一个单元格,以便我的日期在第0行,而其他所有值都保持不变?

问题描述 投票:2回答:1

My Dataframe that I am working with

我正在尝试将Pandas.dropna()用于第2列上的日期,以便该日期位于索引0。

df=pd.read_excel(excel_filepath,sheetname='Consolidated Balance Sheets',header=None)

python pandas dataframe
1个回答
0
投票

您尝试过:

df.iloc[0,2] = df.iloc[2,8]

© www.soinside.com 2019 - 2024. All rights reserved.