版本 0.20.2 (2017 年 6 月 4 日)#

這是 0.20.x 系列中的一個次要錯誤修復版本,包含一些小的迴歸修復、錯誤修復和效能改進。我們建議所有使用者都升級到此版本。

增強功能#

  • 開放了對 pytables 支援的其他壓縮型別(‘blosc:blosclz’、‘blosc:lz4’、‘blosc:lz4hc’、‘blosc:snappy’、‘blosc:zlib’、‘blosc:zstd’)的訪問(GH 14478

  • Series 提供了 to_latex 方法(GH 16180

  • 添加了一個新的 groupby 方法 GroupBy.ngroup(),與現有的 GroupBy.cumcount() 並行,用於返回組的順序(GH 11642);請參閱此處

效能改進#

  • 使用列表式索引時的效能迴歸修復(GH 16285

  • MultiIndexes 的效能迴歸修復(GH 16319GH 16346

  • 使用標量引數時 .clip() 的效能改進(GH 15400

  • 使用分類分組器進行 groupby 的效能改進(GH 16413

  • MultiIndex.remove_unused_levels() 的效能改進(GH 16556

Bug 修復#

  • 在某些 Windows 環境下,當檢測終端大小時,關於“tput: terminal attributes: No such device or address”的警告被靜默。此修復僅適用於 Python 3(GH 16496

  • 在使用 io 函式時使用 pathlib.Pathpy.path.local 物件時存在錯誤(GH 16291

  • 在兩個相等的 MultiIndex 上使用 Index.symmetric_difference() 時存在錯誤,導致 TypeErrorGH 13490

  • DataFrame.update() 中使用 overwrite=FalseNaN 時存在錯誤(GH 15593

  • 將無效的引擎傳遞給 read_csv() 現在會引發一個資訊性的 ValueError 而不是 UnboundLocalError。(GH 16511

  • 在元組陣列上使用 unique() 時存在錯誤(GH 16519

  • cut() 中設定 labels 時存在錯誤,導致標籤順序不正確(GH 16459

  • 修復了與 IPython 6.0 的製表符補全相容性問題,該問題在 Categoricals 上顯示了棄用警告(GH 16409

轉換#

  • to_numeric() 中,空資料輸入導致直譯器發生段錯誤(GH 16302

  • 當使用比較運算子將 DataFrame 廣播到 Series 時,靜默了 numpy 警告(GH 16378GH 16306

索引#

  • DataFrame.reset_index(level=) 中使用單級別索引時存在錯誤(GH 16263

  • 在具有單調但不嚴格單調的索引上進行部分字串索引時存在錯誤,導致切片邊界反轉不正確(GH 16515

  • MultiIndex.remove_unused_levels() 中存在錯誤,導致返回的 MultiIndex 與原始的 MultiIndex 不相等。(GH 16556

IO#

  • read_csv() 中,當在空格分隔的文字檔案中傳遞 comment 引數時存在錯誤(GH 16472

  • read_csv() 中,當 usecols 中存在不存在的列且其長度正確時,沒有引發異常(GH 14671

  • 導致不必要地匯入剪貼簿例程的錯誤,可能會在啟動時導致匯入錯誤(GH 16288

  • 當 HTML 渲染空 DataFrame 時引發 IndexError 的錯誤(GH 15953

  • read_csv() 中,當 Python 2.x 中的 C 引擎處理 tarfile 物件輸入時引發錯誤(GH 16530

  • DataFrame.to_html() 忽略 index_names 引數的錯誤(GH 16493

  • pd.read_hdf() 為索引名稱返回 numpy 字串的錯誤(GH 13492

  • HDFStore.select_as_multiple() 中,start/stop 引數未被尊重的錯誤(GH 16209

繪圖#

  • 使用單列和列表式 colorDataFrame.plot 的錯誤(GH 3486

  • plot 中,DatetimeIndex 中的 NaT 導致 Timestamp.min 的錯誤(GH 12405

  • DataFrame.boxplot 中,對於非分組箱線圖,figsize 關鍵字未被尊重的錯誤(GH 11959

GroupBy/resample/rolling

  • 在建立空的 DataFrame 的基於時間的滾動視窗時存在錯誤(GH 15819

  • rolling.cov() 中使用偏移視窗時存在錯誤(GH 16058

  • 在對整數進行聚合時,.resample().groupby() 存在錯誤(GH 16361

Sparse#

  • scipy.sparse.dok_matrix 構建 SparseDataFrame 時存在錯誤(GH 16179

Reshaping#

  • DataFrame.stack 中,當 MultiIndex 列的級別未排序時存在錯誤(GH 16323

  • pd.wide_to_long() 中,當 i 不是唯一識別符號時未引發錯誤(GH 16382

  • Series.isin(..) 中使用元組列表時存在錯誤(GH 16394

  • 構建具有混合資料型別(包括全 NaT 列)的 DataFrame 時存在錯誤。(GH 16395

  • DataFrame.agg()Series.agg() 中,對非可呼叫屬性進行聚合時存在錯誤(GH 16405

數值#

  • .interpolate() 中,當傳遞 limit=None(預設值)時,limit_direction 未被尊重的錯誤(GH 16282

分類#

  • 修復了在兩個無序的分類資料比較時,考慮類別順序的比較操作(GH 16014

其他#

  • DataFrame.drop() 中,使用空列表和非唯一索引時存在錯誤(GH 16270

貢獻者#

共有 34 人為本次釋出貢獻了補丁。名字旁有“+”的人是首次貢獻補丁。

  • Aaron Barber +

  • Andrew 亮 +

  • Becky Sweger +

  • Christian Prinoth +

  • Christian Stade-Schuldt +

  • DSM

  • Erik Fredriksen +

  • Hugues Valois +

  • Jeff Reback

  • Jeff Tratner

  • JimStearns206 +

  • John W. O’Brien

  • Joris Van den Bossche

  • JosephWagner +

  • Keith Webber +

  • Mehmet Ali “Mali” Akmanalp +

  • Pankaj Pandey

  • Patrick Luo +

  • Patrick O’Melveny +

  • Pietro Battiston

  • RobinFiveWords +

  • Ryan Hendrickson +

  • SimonBaron +

  • Tom Augspurger

  • WBare +

  • bpraggastis +

  • chernrick +

  • chris-b1

  • economy +

  • gfyoung

  • jaredsnyder +

  • keitakurita +

  • linebp

  • lloydkirk +