import pandas as pd
f3 = r”C:\Python\example\csvreader\skl_cashFlowIRR2.xlsx”
df3 = pd.read_excel(f3) ;
print( df3,”\n”,type(df3) ) #DataFrame
print( df3[“Cash Flow 1″],”\n”,type(df3[“Cash Flow 1”])) #Series
print( list(df3[“Cash Flow 1”]) )
#取得到這個list,
#就可以用numpy_financial.irr()計算內部報酬率
![Python如何讀取excel檔(.xlsx)?如何用欄標籤提取某一直行?df=pandas.read_excel() ; df["欄標籤"] - 儲蓄保險王](https://savingking.com.tw/wp-content/uploads/2022/11/20221109163631_39.png)
輸出:
![Python如何讀取excel檔(.xlsx)?如何用欄標籤提取某一直行?df=pandas.read_excel() ; df["欄標籤"] - 儲蓄保險王](https://savingking.com.tw/wp-content/uploads/2022/11/20221109163816_19.png)
![Python常用的模組內建常數; __name__ ; __file__ ; __doc__ ; __all__ ;__dict__; vars()->Dict[str,str] ; dir()->List[str] Python常用的模組內建常數; __name__ ; __file__ ; __doc__ ; __all__ ;__dict__; vars()->Dict[str,str] ; dir()->List[str]](https://i1.wp.com/savingking.com.tw/wp-content/uploads/2022/11/20221112184006_50.png?quality=90&zoom=2&ssl=1&resize=350%2C233)









近期留言