乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      為什么pandas讀取出來的表格 empty dataframe

       融水公子 2023-06-23 發(fā)布于福建
      表白:黑白圣堂血天使,天劍鬼刀阿修羅。 
      講解對象:
      /為什么pandas讀取出來的表格 empty dataframe
      作者:融水公子 rsgz
      ===


      我的需求:今天想把這個文件夾下面的 這幾個表格用Python進行合并


      代碼實現(xiàn):
      import pandas as pd
      from rsgz.file.files import get_files
      
      path = r"C:\Users\Administrator\Desktop\8182\3 6-32 03 店小蜜 10-5 克重檢查"
      df_l=[pd.read_excel(xlsx, engine="openpyxl", sheet_name="wish_", index_col=False) for xlsx in get_files(path)]
      print(df_l)
      merged_df = pd.concat(df_l, axis=0)
      merged_df.to_excel(r"000.xlsx")

      按照我的猜想這個代碼運行起來應該是不會報錯的  
      確實沒有報錯 但是沒有獲取到表格里面的數(shù)據(jù)
      Empty DataFrame
      Columns: [ParentSKU]
      Index: []

      我的表格里面應該有這些數(shù)據(jù)才對


      這個應該是xlsx不僅僅有一種,但是我們常用的pandas只支持其中的一種xlsx文件

      換句話說呢  就是pandas還是不夠健全



      所以呢 不用糾結了 還是使用openpyxl模塊吧 這個模塊可以解析這個表格的內容

      === 
      公眾號:不浪仙人
      謝謝大家的支持!可以點擊我的頭像,進入我的空間瀏覽更多文章呢。建議大家360doc[www.hbhlny.cn]注冊一個賬號登錄,里面真的有很多優(yōu)秀的文章,歡迎大家的到來。
      ---

        轉藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多