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 struct.pack() 將整數轉換為bytes ; while list: str1=list[0] ; 中間內容; list=[1:] #切片 ,遍歷list中的每一個元素,跟for i in list 類似 ; timeit() #計時 Python struct.pack() 將整數轉換為bytes ; while list: str1=list[0] ; 中間內容; list=[1:] #切片 ,遍歷list中的每一個元素,跟for i in list 類似 ; timeit() #計時](https://i1.wp.com/savingking.com.tw/wp-content/uploads/2022/10/20221012095050_42.png?quality=90&zoom=2&ssl=1&resize=350%2C233)
![Python: matplotlib如何控制legend的位置? ax.legend(handles=[patch], loc=’upper left’, bbox_to_anchor=(6/10, 3/5) Python: matplotlib如何控制legend的位置? ax.legend(handles=[patch], loc=’upper left’, bbox_to_anchor=(6/10, 3/5)](https://i1.wp.com/savingking.com.tw/wp-content/uploads/2023/05/20230502163945_79.png?quality=90&zoom=2&ssl=1&resize=350%2C233)


![Python PyMuPDF fitz 教學:從pdf中抓文字、抓 fonts、抓表格; pip install PyMuPDF ; import fitz ; text_dict = page.get_text(“dict”) #type(page) is pymupdf.Page ; blocks:list[dict] = text_dict[‘blocks’] ; page.find_tables().tables [0].extract() ;如何判斷粗體字? Python PyMuPDF fitz 教學:從pdf中抓文字、抓 fonts、抓表格; pip install PyMuPDF ; import fitz ; text_dict = page.get_text(“dict”) #type(page) is pymupdf.Page ; blocks:list[dict] = text_dict[‘blocks’] ; page.find_tables().tables [0].extract() ;如何判斷粗體字?](https://i2.wp.com/savingking.com.tw/wp-content/uploads/2026/05/20260527141829_0_5a8a75.png?quality=90&zoom=2&ssl=1&resize=350%2C233)




近期留言