Python 使用命令跳过第一个空列
在从pandas读取excel时,我需要跳过第一列,该列完全为空。我试着跳过专栏,但没用。e、 g:Python 使用命令跳过第一个空列,python,pandas,Python,Pandas,在从pandas读取excel时,我需要跳过第一列,该列完全为空。我试着跳过专栏,但没用。e、 g: import pandas as pd df=pd.read_excel("c:/test.xlsx", sheet_name='ABC',skiprows=2, skipcolumns=1) 谢谢你的帮助 你可以做df=df.iloc[:,1:]你知道你之前有多少列吗?@BilltheLizard-将有200多列columns@Ram谢谢,成功了关于usecols?你可以做df=df.ilo
import pandas as pd
df=pd.read_excel("c:/test.xlsx", sheet_name='ABC',skiprows=2, skipcolumns=1)
谢谢你的帮助 你可以做
df=df.iloc[:,1:]
你知道你之前有多少列吗?@BilltheLizard-将有200多列columns@Ram谢谢,成功了关于usecols
?你可以做df=df.iloc[:,1:]
你知道你之前有多少列吗?@BilltheLizard-将有200多列columns@Ram谢谢,成功了usecols
怎么样?