1.1.0 版本更新 (2020 年 7 月 28 日)#
這是 pandas 1.1.0 版本中的更改。請參閱 釋出說明 以獲取包含其他 pandas 版本的完整變更日誌。
增強功能#
loc 引發的 KeyError 會指明丟失的標籤#
以前,如果在 `.loc` 呼叫中丟失了標籤,會引發一個 KeyError,指出這已不再受支援。
現在,錯誤訊息還包含一個丟失標籤的列表(最多 10 項,顯示寬度 80 個字元)。請參閱 GH 34272。
所有 dtype 現在都可以轉換為 StringDtype#
以前,通常只有當資料已經是 str 或類似 nan 的值時,才能宣告或轉換為 StringDtype(GH 31204)。StringDtype 現在在 astype(str) 或 dtype=str 生效的所有情況下都有效。
例如,以下程式碼現在可以正常工作
In [1]: ser = pd.Series([1, "abc", np.nan], dtype="string")
In [2]: ser
Out[2]:
0 1
1 abc
2 <NA>
dtype: string
In [3]: ser[0]
Out[3]: '1'
In [4]: pd.Series([1, 2, np.nan], dtype="Int64").astype("string")
Out[4]:
0 1
1 2
2 <NA>
dtype: string
非單調的 PeriodIndex 部分字串切片#
PeriodIndex 現在支援對非單調索引進行部分字串切片,與 DatetimeIndex 的行為相呼應(GH 31096)
例如:
In [5]: dti = pd.date_range("2014-01-01", periods=30, freq="30D")
In [6]: pi = dti.to_period("D")
In [7]: ser_monotonic = pd.Series(np.arange(30), index=pi)
In [8]: shuffler = list(range(0, 30, 2)) + list(range(1, 31, 2))
In [9]: ser = ser_monotonic.iloc[shuffler]
In [10]: ser
Out[10]:
2014-01-01 0
2014-03-02 2
2014-05-01 4
2014-06-30 6
2014-08-29 8
..
2015-09-23 21
2015-11-22 23
2016-01-21 25
2016-03-21 27
2016-05-20 29
Freq: D, Length: 30, dtype: int64
In [11]: ser["2014"]
Out[11]:
2014-01-01 0
2014-03-02 2
2014-05-01 4
2014-06-30 6
2014-08-29 8
2014-10-28 10
2014-12-27 12
2014-01-31 1
2014-04-01 3
2014-05-31 5
2014-07-30 7
2014-09-28 9
2014-11-27 11
Freq: D, dtype: int64
In [12]: ser.loc["May 2015"]
Out[12]:
2015-05-26 17
Freq: D, dtype: int64
比較兩個 DataFrame 或兩個 Series 並總結差異#
我們添加了 DataFrame.compare() 和 Series.compare(),用於比較兩個 DataFrame 或兩個 Series(GH 30429)
In [13]: df = pd.DataFrame(
....: {
....: "col1": ["a", "a", "b", "b", "a"],
....: "col2": [1.0, 2.0, 3.0, np.nan, 5.0],
....: "col3": [1.0, 2.0, 3.0, 4.0, 5.0]
....: },
....: columns=["col1", "col2", "col3"],
....: )
....:
In [14]: df
Out[14]:
col1 col2 col3
0 a 1.0 1.0
1 a 2.0 2.0
2 b 3.0 3.0
3 b NaN 4.0
4 a 5.0 5.0
In [15]: df2 = df.copy()
In [16]: df2.loc[0, 'col1'] = 'c'
In [17]: df2.loc[2, 'col3'] = 4.0
In [18]: df2
Out[18]:
col1 col2 col3
0 c 1.0 1.0
1 a 2.0 2.0
2 b 3.0 4.0
3 b NaN 4.0
4 a 5.0 5.0
In [19]: df.compare(df2)
Out[19]:
col1 col3
self other self other
0 a c NaN NaN
2 NaN NaN 3.0 4.0
有關更多詳細資訊,請參閱 使用者指南。
允許 groupby 鍵中存在 NA#
在 groupby 中,我們向 DataFrame.groupby() 和 Series.groupby() 添加了一個 dropna 關鍵字引數,以允許在組鍵中使用 NA 值。如果使用者希望在 groupby 鍵中包含 NA 值,可以將 dropna 設定為 False。為保持向後相容性,dropna 的預設值設定為 True(GH 3729)。
In [20]: df_list = [[1, 2, 3], [1, None, 4], [2, 1, 3], [1, 2, 2]]
In [21]: df_dropna = pd.DataFrame(df_list, columns=["a", "b", "c"])
In [22]: df_dropna
Out[22]:
a b c
0 1 2.0 3
1 1 NaN 4
2 2 1.0 3
3 1 2.0 2
# Default ``dropna`` is set to True, which will exclude NaNs in keys
In [23]: df_dropna.groupby(by=["b"], dropna=True).sum()
Out[23]:
a c
b
1.0 2 3
2.0 2 5
# In order to allow NaN in keys, set ``dropna`` to False
In [24]: df_dropna.groupby(by=["b"], dropna=False).sum()
Out[24]:
a c
b
1.0 2 3
2.0 2 5
NaN 1 4
dropna 引數的預設設定為 True,這意味著 NA 值不包含在組鍵中。
使用鍵進行排序#
我們在 DataFrame 和 Series 的排序方法中添加了一個 key 引數,包括 DataFrame.sort_values()、DataFrame.sort_index()、Series.sort_values() 和 Series.sort_index()。在執行排序之前,key 可以是任何可呼叫函式,它將逐列應用於用於排序的每一列(GH 27237)。有關更多資訊,請參閱 使用鍵進行 sort_values 和 使用鍵進行 sort_index。
In [25]: s = pd.Series(['C', 'a', 'B'])
In [26]: s
Out[26]:
0 C
1 a
2 B
dtype: str
In [27]: s.sort_values()
Out[27]:
2 B
0 C
1 a
dtype: str
注意這裡是大寫字母在前排序。如果我們應用 Series.str.lower() 方法,我們會得到
In [28]: s.sort_values(key=lambda x: x.str.lower())
Out[28]:
1 a
2 B
0 C
dtype: str
當應用於 DataFrame 時,鍵會按列應用於所有列,或者如果指定了 by,則應用於部分列,例如:
In [29]: df = pd.DataFrame({'a': ['C', 'C', 'a', 'a', 'B', 'B'],
....: 'b': [1, 2, 3, 4, 5, 6]})
....:
In [30]: df
Out[30]:
a b
0 C 1
1 C 2
2 a 3
3 a 4
4 B 5
5 B 6
In [31]: df.sort_values(by=['a'], key=lambda col: col.str.lower())
Out[31]:
a b
2 a 3
3 a 4
4 B 5
5 B 6
0 C 1
1 C 2
有關更多詳細資訊,請參閱 DataFrame.sort_values()、Series.sort_values() 和 sort_index() 中的示例和文件。
Timestamp 建構函式中支援 fold 引數#
Timestamp: 現在支援與父類 datetime.datetime 類似的 PEP 495 中定義的 keyword-only fold 引數。它支援接受 fold 作為初始化引數,並從其他建構函式引數推斷 fold(GH 25057,GH 31338)。支援僅限於 dateutil 時區,因為 pytz 不支援 fold。
例如:
In [32]: ts = pd.Timestamp("2019-10-27 01:30:00+00:00")
In [33]: ts.fold
Out[33]: 0
In [34]: ts = pd.Timestamp(year=2019, month=10, day=27, hour=1, minute=30,
....: tz="dateutil/Europe/London", fold=1)
....:
In [35]: ts
Out[35]: Timestamp('2019-10-27 01:30:00+0000', tz='dateutil//usr/share/zoneinfo/Europe/London')
有關 fold 的更多資訊,請參閱使用者指南中的 Fold 小節。
在 to_datetime 中解析包含不同時區的時區感知格式#
to_datetime() 現在支援解析包含時區名稱(%Z)和 UTC 偏移量(%z)的格式,這些格式來自與設定為 utc=True 的 UTC 不同的時區,然後將它們轉換為 UTC。這將返回一個在 UTC 時區的 DatetimeIndex,而不是一個 object dtype 的 Index,如果 utc=True 未設定(GH 32792)。
例如:
In [36]: tz_strs = ["2010-01-01 12:00:00 +0100", "2010-01-01 12:00:00 -0100",
....: "2010-01-01 12:00:00 +0300", "2010-01-01 12:00:00 +0400"]
....:
In [37]: pd.to_datetime(tz_strs, format='%Y-%m-%d %H:%M:%S %z', utc=True)
Out[37]:
DatetimeIndex(['2010-01-01 11:00:00+00:00', '2010-01-01 13:00:00+00:00',
'2010-01-01 09:00:00+00:00', '2010-01-01 08:00:00+00:00'],
dtype='datetime64[us, UTC]', freq=None)
In[37]: pd.to_datetime(tz_strs, format='%Y-%m-%d %H:%M:%S %z')
Out[37]:
Index([2010-01-01 12:00:00+01:00, 2010-01-01 12:00:00-01:00,
2010-01-01 12:00:00+03:00, 2010-01-01 12:00:00+04:00],
dtype='object')
Grouper 和 resample 現在支援 origin 和 offset 引數#
Grouper 和 DataFrame.resample() 現在支援 origin 和 offset 引數。這允許使用者控制用於調整分組的時間戳。(GH 31809)
分組的 bin 是根據時間序列起始點那一天的開始時間進行調整的。這對於頻率是日倍數(如 30D)或能整除一日(如 90s 或 1min)的情況效果很好。但是,對於某些不滿足此條件的頻率,可能會出現不一致。要更改此行為,您現在可以使用 origin 引數指定一個固定的時間戳。
現在有兩個引數已被棄用(更多資訊請參見 DataFrame.resample() 的文件)
base應被替換為offset。loffset應透過在重取樣後直接將一個 offset 新增到DataFrame的索引來替換。
使用 origin 的小示例
In [38]: start, end = '2000-10-01 23:30:00', '2000-10-02 00:30:00'
In [39]: middle = '2000-10-02 00:00:00'
In [40]: rng = pd.date_range(start, end, freq='7min')
In [41]: ts = pd.Series(np.arange(len(rng)) * 3, index=rng)
In [42]: ts
Out[42]:
2000-10-01 23:30:00 0
2000-10-01 23:37:00 3
2000-10-01 23:44:00 6
2000-10-01 23:51:00 9
2000-10-01 23:58:00 12
2000-10-02 00:05:00 15
2000-10-02 00:12:00 18
2000-10-02 00:19:00 21
2000-10-02 00:26:00 24
Freq: 7min, dtype: int64
使用預設行為 'start_day' 進行重取樣(origin 是 2000-10-01 00:00:00)
In [43]: ts.resample('17min').sum()
Out[43]:
2000-10-01 23:14:00 0
2000-10-01 23:31:00 9
2000-10-01 23:48:00 21
2000-10-02 00:05:00 54
2000-10-02 00:22:00 24
Freq: 17min, dtype: int64
In [44]: ts.resample('17min', origin='start_day').sum()
Out[44]:
2000-10-01 23:14:00 0
2000-10-01 23:31:00 9
2000-10-01 23:48:00 21
2000-10-02 00:05:00 54
2000-10-02 00:22:00 24
Freq: 17min, dtype: int64
使用固定 origin 進行重取樣
In [45]: ts.resample('17min', origin='epoch').sum()
Out[45]:
2000-10-01 23:18:00 0
2000-10-01 23:35:00 18
2000-10-01 23:52:00 27
2000-10-02 00:09:00 39
2000-10-02 00:26:00 24
Freq: 17min, dtype: int64
In [46]: ts.resample('17min', origin='2000-01-01').sum()
Out[46]:
2000-10-01 23:24:00 3
2000-10-01 23:41:00 15
2000-10-01 23:58:00 45
2000-10-02 00:15:00 45
Freq: 17min, dtype: int64
如果需要,您可以使用 offset 引數(一個 Timedelta)來調整 bin,該引數將加到預設的 origin 上。
完整的示例請參見:使用 origin 或 offset 調整 bin 的開始時間。
現在使用 fsspec 進行檔案系統處理#
對於讀取和寫入本地以外的檔案系統以及從 HTTP(S) 讀取,將使用可選依賴項 fsspec 來分派操作(GH 33452)。這將使 S3 和 GCS 儲存(已經支援)的功能保持不變,同時還增加了對其他幾種儲存實現的支援,例如 Azure Datalake 和 Blob、SSH、FTP、dropbox 和 github。有關文件和功能,請參閱 fsspec 文件。
與 S3 和 GCS 介面的現有功能在此更改中不受影響,因為 fsspec 仍將引入與之前相同的包。
其他增強功能#
與 matplotlib 3.3.0 的相容性(GH 34850)
IntegerArray.astype()現在支援datetime64dtype(GH 32538)IntegerArray現在實現了sum操作(GH 33172)添加了一個
pandas.api.indexers.FixedForwardWindowIndexer()類,用於在rolling操作期間支援前瞻性視窗。添加了一個
pandas.api.indexers.VariableOffsetWindowIndexer()類,用於支援具有非固定偏移量的rolling操作(GH 34994)describe()現在包括一個datetime_is_numeric關鍵字引數,用於控制如何彙總 datetime 列(GH 30164,GH 34798)highlight_null()現在接受subset引數(GH 31345)當直接寫入 sqlite 連線時,
DataFrame.to_sql()現在支援multi方法(GH 29921)pandas.errors.OptionError現在已在pandas.errors中公開(GH 27553)添加了
api.extensions.ExtensionArray.argmax()和api.extensions.ExtensionArray.argmin()(GH 24382)timedelta_range()在傳遞start、stop和periods時,現在會推斷出頻率(GH 32377)在
IntervalIndex上的位置切片現在支援step > 1的切片(GH 31658)Series.str現在有一個fullmatch方法,該方法會將正則表示式與Series中每行的整個字串進行匹配,類似於re.fullmatch(GH 32806)。DataFrame.sample()現在還允許將類陣列物件和 BitGenerator 物件作為種子傳遞給random_state(GH 32503)Index.union()現在會對MultiIndex物件引發RuntimeWarning,如果內部物件不可排序。傳遞sort=False以抑制此警告(GH 33015)添加了
Series.dt.isocalendar()和DatetimeIndex.isocalendar(),它們返回一個DataFrame,其中包含根據 ISO 8601 日曆計算的年、周和日(GH 33206,GH 34392)。現在
DataFrame.to_feather()方法支援 pyarrow 0.17 中新增的其他關鍵字引數(例如,設定壓縮)(GH 33422)。現在
cut()接受ordered引數,預設值為ordered=True。如果ordered=False且未提供標籤,則會引發錯誤(GH 33141)現在
DataFrame.to_csv()、DataFrame.to_pickle()和DataFrame.to_json()在使用gzip和bz2協議時,支援傳遞一個壓縮引數字典。這可用於設定自定義壓縮級別,例如df.to_csv(path, compression={'method': 'gzip', 'compresslevel': 1}(GH 33196)melt()已獲得一個ignore_index(預設True)引數,如果設定為False,則可以阻止該方法刪除索引(GH 17440)。Series.update()現在接受可以強制轉換為Series的物件,例如dict和list,這與DataFrame.update()的行為相呼應(GH 33215)DataFrameGroupBy.transform()和DataFrameGroupBy.aggregate()獲得了engine和engine_kwargs引數,支援使用Numba執行函式(GH 32854,GH 33388)Resampler.interpolate()現在支援 SciPy 插值方法scipy.interpolate.CubicSpline作為方法cubicspline(GH 33670)DataFrameGroupBy和SeriesGroupBy現在實現了sample方法,用於在組內進行隨機抽樣(GH 31775)DataFrame.to_numpy()現在支援na_value關鍵字引數,用於控制輸出陣列中的 NA 標記(GH 33820)已將
api.extension.ExtensionArray.equals新增到擴充套件陣列介面,類似於Series.equals()(GH 27081)在
read_stata()和StataReader中,最低支援的 dta 版本已提高到 105(GH 26667)。to_stata()支援使用compression關鍵字引數進行壓縮。壓縮可以自動推斷,也可以透過字串或包含方法和傳遞給壓縮庫的任何其他引數的字典顯式設定。壓縮也已新增到低階 Stata 檔案寫入器StataWriter、StataWriter117和StataWriterUTF8中(GH 26599)。HDFStore.put()現在接受track_times引數。此引數將傳遞給PyTables的create_table方法(GH 32682)。Series.plot()和DataFrame.plot()現在接受xlabel和ylabel引數,用於在 x 軸和 y 軸上顯示標籤(GH 9093)。使
Rolling和Expanding可迭代(GH 11704)使
option_context成為contextlib.ContextDecorator,允許將其用作整個函式的裝飾器(GH 34253)。DataFrame.to_csv()和Series.to_csv()現在接受errors引數(GH 22610)DataFrameGroupBy.groupby.transform()現在允許func為pad、backfill和cumcount(GH 31269)。read_json()現在接受nrows引數。(GH 33916)。DataFrame.hist()、Series.hist()、core.groupby.DataFrameGroupBy.hist()和core.groupby.SeriesGroupBy.hist()獲得了legend引數。設定為 True 可在直方圖中顯示圖例。(GH 6279)concat()和append()現在會保留擴充套件 dtype,例如,將一個可為空的整數列與一個 numpy 整數列合併將不再導致 object dtype,而是保留整數 dtype(GH 33607,GH 34339,GH 34095)。read_gbq()現在允許停用進度條(GH 33360)。read_gbq()現在支援pandas-gbq中的max_results關鍵字引數(GH 34639)。DataFrame.cov()和Series.cov()現在支援一個新的引數ddof,以支援與相應的 numpy 方法相同的 delta degrees of freedom(GH 34611)。DataFrame.to_html()和DataFrame.to_string()的col_space引數現在接受列表或字典,以僅更改特定列的寬度(GH 28917)。DataFrame.to_excel()現在還可以寫入 OpenOffice 電子表格(.ods)檔案(GH 27222)。explode()現在接受ignore_index來重置索引,類似於pd.concat()或DataFrame.sort_values()(GH 34932)。DataFrame.to_markdown()和Series.to_markdown()現在接受index引數作為 tabulate 的showindex的別名(GH 32667)。read_csv()現在接受字串值,如“0”、“0.0”、“1”、“1.0”作為可轉換為可為空的布林 dtype(GH 34859)。ExponentialMovingWindow現在支援times引數,該引數允許使用times中的時間戳間隔觀測值來計算mean(GH 34839)。DataFrame.agg()和Series.agg()現在接受命名聚合,用於重新命名輸出列/索引。(GH 26513)。compute.use_numba現在作為一個配置選項存在,該選項在可用時利用 numba 引擎(GH 33966, GH 35374)。Series.plot()現在支援非對稱誤差條。以前,如果Series.plot()收到一個“2xN”陣列用於yerr和/或xerr的誤差值,則左/下值(第一行)會被映象,而右/上值(第二行)會被忽略。現在,第一行表示左/下誤差值,第二行表示右/上誤差值。(GH 9536)。
重要的 bug 修復#
這些 bug 修復可能帶來行為上的顯著變化。
MultiIndex.get_indexer 正確解釋了 method 引數(#)。
這恢復了 MultiIndex.get_indexer() 在 method='backfill' 或 method='pad' 下的行為,使其與 pandas 0.23.0 之前的行為一致。特別是,MultiIndexes 被視為元組列表,並且填充或回填是相對於這些元組列表的順序進行的(GH 29896)。
以此為例,給定
In [47]: df = pd.DataFrame({
....: 'a': [0, 0, 0, 0],
....: 'b': [0, 2, 3, 4],
....: 'c': ['A', 'B', 'C', 'D'],
....: }).set_index(['a', 'b'])
....:
In [48]: mi_2 = pd.MultiIndex.from_product([[0], [-1, 0, 1, 3, 4, 5]])
使用 mi_2 對 df 進行重索引並使用 method='backfill' 的差異可以在這裡看到:
pandas >= 0.23, < 1.1.0:
In [1]: df.reindex(mi_2, method='backfill')
Out[1]:
c
0 -1 A
0 A
1 D
3 A
4 A
5 C
pandas <0.23, >= 1.1.0
In [49]: df.reindex(mi_2, method='backfill')
Out[49]:
c
0 -1 A
0 A
1 B
3 C
4 D
5 NaN
以及使用 method='pad' 對 df 進行重索引並使用 mi_2 的差異可以在這裡看到:
pandas >= 0.23, < 1.1.0
In [1]: df.reindex(mi_2, method='pad')
Out[1]:
c
0 -1 NaN
0 NaN
1 D
3 NaN
4 A
5 C
pandas < 0.23, >= 1.1.0
In [50]: df.reindex(mi_2, method='pad')
Out[50]:
c
0 -1 NaN
0 A
1 A
3 C
4 D
5 D
失敗的基於標籤的查詢始終引發 KeyError(#)。
以前,series[key]、series.loc[key] 和 frame.loc[key] 的標籤查詢會根據 key 的型別和 Index 的型別引發 KeyError 或 TypeError。現在它們一致地引發 KeyError(GH 31867)。
In [51]: ser1 = pd.Series(range(3), index=[0, 1, 2])
In [52]: ser2 = pd.Series(range(3), index=pd.date_range("2020-02-01", periods=3))
先前行為:
In [3]: ser1[1.5]
...
TypeError: cannot do label indexing on Int64Index with these indexers [1.5] of type float
In [4] ser1["foo"]
...
KeyError: 'foo'
In [5]: ser1.loc[1.5]
...
TypeError: cannot do label indexing on Int64Index with these indexers [1.5] of type float
In [6]: ser1.loc["foo"]
...
KeyError: 'foo'
In [7]: ser2.loc[1]
...
TypeError: cannot do label indexing on DatetimeIndex with these indexers [1] of type int
In [8]: ser2.loc[pd.Timestamp(0)]
...
KeyError: Timestamp('1970-01-01 00:00:00')
新行為:
In [3]: ser1[1.5]
...
KeyError: 1.5
In [4] ser1["foo"]
...
KeyError: 'foo'
In [5]: ser1.loc[1.5]
...
KeyError: 1.5
In [6]: ser1.loc["foo"]
...
KeyError: 'foo'
In [7]: ser2.loc[1]
...
KeyError: 1
In [8]: ser2.loc[pd.Timestamp(0)]
...
KeyError: Timestamp('1970-01-01 00:00:00')
類似地,如果傳遞了不相容的 key,DataFrame.at() 和 Series.at() 將引發 TypeError 而不是 ValueError;如果傳遞了缺失的 key,將引發 KeyError,這與 .loc[] 的行為一致(GH 31722)。
MultiIndex 上的失敗整數查詢引發 KeyError(#)。
當 MultiIndex 的第一個級別是整數 dtype 時,使用整數進行索引,如果其中一個或多個整數 key 在索引的第一個級別中不存在,則錯誤地未能引發 KeyError(GH 33539)。
In [53]: idx = pd.Index(range(4))
In [54]: dti = pd.date_range("2000-01-03", periods=3)
In [55]: mi = pd.MultiIndex.from_product([idx, dti])
In [56]: ser = pd.Series(range(len(mi)), index=mi)
先前行為:
In [5]: ser[[5]]
Out[5]: Series([], dtype: int64)
新行為:
In [5]: ser[[5]]
...
KeyError: '[5] not in index'
DataFrame.merge() 保留右側 DataFrame 的行順序(#)。
DataFrame.merge() 在執行右合併時現在保留右側 DataFrame 的行順序(GH 27453)。
In [57]: left_df = pd.DataFrame({'animal': ['dog', 'pig'],
....: 'max_speed': [40, 11]})
....:
In [58]: right_df = pd.DataFrame({'animal': ['quetzal', 'pig'],
....: 'max_speed': [80, 11]})
....:
In [59]: left_df
Out[59]:
animal max_speed
0 dog 40
1 pig 11
In [60]: right_df
Out[60]:
animal max_speed
0 quetzal 80
1 pig 11
先前行為:
>>> left_df.merge(right_df, on=['animal', 'max_speed'], how="right")
animal max_speed
0 pig 11
1 quetzal 80
新行為:
In [61]: left_df.merge(right_df, on=['animal', 'max_speed'], how="right")
Out[61]:
animal max_speed
0 quetzal 80
1 pig 11
當 DataFrame 的某些列不存在時,向多個列進行賦值(#)。
當 DataFrame 的某些列不存在時,向多個列進行賦值,以前會將值分配給最後一列。現在,將使用正確的值構建新列。(GH 13658)。
In [62]: df = pd.DataFrame({'a': [0, 1, 2], 'b': [3, 4, 5]})
In [63]: df
Out[63]:
a b
0 0 3
1 1 4
2 2 5
先前行為:
In [3]: df[['a', 'c']] = 1
In [4]: df
Out[4]:
a b
0 1 1
1 1 1
2 1 1
新行為:
In [64]: df[['a', 'c']] = 1
In [65]: df
Out[65]:
a b c
0 1 3 1
1 1 4 1
2 1 5 1
groupby 聚合的一致性(#)。
將 DataFrame.groupby() 與 as_index=True 和聚合函式 nunique 一起使用時,會將分組列包含在結果的列中。現在,分組列僅出現在索引中,與其他聚合函式一致。(GH 32579)。
In [66]: df = pd.DataFrame({"a": ["x", "x", "y", "y"], "b": [1, 1, 2, 3]})
In [67]: df
Out[67]:
a b
0 x 1
1 x 1
2 y 2
3 y 3
先前行為:
In [3]: df.groupby("a", as_index=True).nunique()
Out[4]:
a b
a
x 1 1
y 1 2
新行為:
In [68]: df.groupby("a", as_index=True).nunique()
Out[68]:
b
a
x 1
y 2
將 DataFrame.groupby() 與 as_index=False 和函式 idxmax、idxmin、mad、nunique、sem、skew 或 std 一起使用時,會修改分組列。現在,分組列保持不變,與其他聚合函式一致。(GH 21090, GH 10355)。
先前行為:
In [3]: df.groupby("a", as_index=False).nunique()
Out[4]:
a b
0 1 1
1 1 2
新行為:
In [69]: df.groupby("a", as_index=False).nunique()
Out[69]:
a b
0 x 1
1 y 2
方法 DataFrameGroupBy.size() 以前會忽略 as_index=False。現在,分組列將作為列返回,使結果成為 DataFrame 而不是 Series。(GH 32599)。
先前行為:
In [3]: df.groupby("a", as_index=False).size()
Out[4]:
a
x 2
y 2
dtype: int64
新行為:
In [70]: df.groupby("a", as_index=False).size()
Out[70]:
a size
0 x 2
1 y 2
當重新命名列時,DataFrameGroupby.agg() 在 as_index=False 時丟失了結果(#)。
以前,當 as_index 選項設定為 False 並且結果列被重新命名時,DataFrameGroupby.agg() 會丟失結果列。在這種情況下,結果值會被之前的索引替換(GH 32240)。
In [71]: df = pd.DataFrame({"key": ["x", "y", "z", "x", "y", "z"],
....: "val": [1.0, 0.8, 2.0, 3.0, 3.6, 0.75]})
....:
In [72]: df
Out[72]:
key val
0 x 1.00
1 y 0.80
2 z 2.00
3 x 3.00
4 y 3.60
5 z 0.75
先前行為:
In [2]: grouped = df.groupby("key", as_index=False)
In [3]: result = grouped.agg(min_val=pd.NamedAgg(column="val", aggfunc="min"))
In [4]: result
Out[4]:
min_val
0 x
1 y
2 z
新行為:
In [73]: grouped = df.groupby("key", as_index=False)
In [74]: result = grouped.agg(min_val=pd.NamedAgg(column="val", aggfunc="min"))
In [75]: result
Out[75]:
key min_val
0 x 1.00
1 y 0.80
2 z 0.75
DataFrame 上的 apply 和 applymap 只會計算第一行/列一次(#)。
In [76]: df = pd.DataFrame({'a': [1, 2], 'b': [3, 6]})
In [77]: def func(row):
....: print(row)
....: return row
....:
先前行為:
In [4]: df.apply(func, axis=1)
a 1
b 3
Name: 0, dtype: int64
a 1
b 3
Name: 0, dtype: int64
a 2
b 6
Name: 1, dtype: int64
Out[4]:
a b
0 1 3
1 2 6
新行為:
In [78]: df.apply(func, axis=1)
a 1
b 3
Name: 0, dtype: int64
a 2
b 6
Name: 1, dtype: int64
Out[78]:
a b
0 1 3
1 2 6
向後不相容的 API 更改#
向 testing.assert_frame_equal 和 testing.assert_series_equal 添加了 check_freq 引數(#)。
在 pandas 1.1.0 中,將 check_freq 引數新增到了 testing.assert_frame_equal() 和 testing.assert_series_equal() 中,並預設為 True。現在,如果索引的頻率不相同,testing.assert_frame_equal() 和 testing.assert_series_equal() 將引發 AssertionError。在 pandas 1.1.0 之前,不檢查索引頻率。
提高了依賴項的最低版本#
更新了一些依賴項的最低支援版本(GH 33718, GH 29766, GH 29723, pytables >= 3.4.3)。如果已安裝,我們現在需要:
包 |
最低版本 |
必需 |
已更改 |
|---|---|---|---|
numpy |
1.15.4 |
X |
X |
pytz |
2015.4 |
X |
|
python-dateutil |
2.7.3 |
X |
X |
bottleneck |
1.2.1 |
||
numexpr |
2.6.2 |
||
pytest (dev) |
4.0.2 |
對於可選庫,一般建議使用最新版本。下表列出了在 pandas 開發過程中始終進行測試的每個庫的最低版本。低於最低測試版本的可選庫可能仍然有效,但未被視為受支援。
包 |
最低版本 |
已更改 |
|---|---|---|
beautifulsoup4 |
4.6.0 |
|
fastparquet |
0.3.2 |
|
fsspec |
0.7.4 |
|
gcsfs |
0.6.0 |
X |
lxml |
3.8.0 |
|
matplotlib |
2.2.2 |
|
numba |
0.46.0 |
|
openpyxl |
2.5.7 |
|
pyarrow |
0.13.0 |
|
pymysql |
0.7.1 |
|
pytables |
3.4.3 |
X |
s3fs |
0.4.0 |
X |
scipy |
1.2.0 |
X |
sqlalchemy |
1.1.4 |
|
xarray |
0.8.2 |
|
xlrd |
1.1.0 |
|
xlsxwriter |
0.9.8 |
|
xlwt |
1.2.0 |
|
pandas-gbq |
1.2.0 |
X |
有關更多資訊,請參閱Dependencies和Optional dependencies。
開發變更(#)。
Cython 的最低版本現在是最新錯誤修復版本(0.29.16)(GH 33334)。
棄用#
在具有單個專案列表的
Series上進行查詢(例如ser[[slice(0, 4)]])已被棄用,並在將來版本中引發錯誤。請將列表轉換為元組,或直接傳遞切片(GH 31333)。DataFrame.mean()和DataFrame.median()在numeric_only=None的情況下,在將來的版本中將包含datetime64和datetime64tz列(GH 29941)。使用帶有位置切片的
.loc進行賦值已被棄用,並在將來版本中引發錯誤。請改用帶有標籤的.loc或帶有位置的.iloc(GH 31840)。DataFrame.to_dict()已棄用接受orient的短名稱,並將在將來版本中引發錯誤(GH 32515)。Categorical.to_dense()已被棄用,並將在將來的版本中移除;請改用np.asarray(cat)(GH 32639)。SingleBlockManager建構函式中的fastpath關鍵字已被棄用,並將在將來的版本中移除(GH 33092)。在
pandas.merge()中將suffixes作為set傳遞已被棄用。請改為提供一個元組(GH 33740, GH 34741)。使用多維索引器(如
[:, None])對Series進行索引以返回ndarray現在會引發FutureWarning。請改為先轉換為 NumPy 陣列(GH 27837)。Index.is_mixed()已被棄用,並將在將來的版本中移除;請直接檢查index.inferred_type(GH 32922)。向
read_html()傳遞除第一個引數外的任何引數作為位置引數已被棄用。所有其他引數都應作為關鍵字引數給出(GH 27573)。向
read_json()傳遞除path_or_buf(第一個引數)外的任何引數作為位置引數已被棄用。所有其他引數都應作為關鍵字引數給出(GH 27573)。向
read_excel()傳遞除前兩個引數外的任何引數作為位置引數已被棄用。所有其他引數都應作為關鍵字引數給出(GH 27573)。pandas.api.types.is_categorical()已被棄用,並將在將來的版本中移除;請改用pandas.api.types.is_categorical_dtype()(GH 33385)。Index.get_value()已被棄用,並將在將來的版本中移除(GH 19728)。Series.dt.week()和Series.dt.weekofyear()已被棄用,並將在將來的版本中移除,請改用Series.dt.isocalendar().week()(GH 33595)。DatetimeIndex.week()和DatetimeIndex.weekofyear已被棄用,並將在將來的版本中移除,請改用DatetimeIndex.isocalendar().week(GH 33595)。DatetimeArray.week()和DatetimeArray.weekofyear已被棄用,並將在將來的版本中移除,請改用DatetimeArray.isocalendar().week(GH 33595)。DateOffset.__call__()已被棄用,並將在將來的版本中移除,請改用offset + other(GH 34171)。apply_index()已被棄用,並將在將來的版本中移除。請改用offset + other(GH 34580)。DataFrame.tshift()和Series.tshift()已被棄用,並將在將來的版本中移除,請改用DataFrame.shift()和Series.shift()(GH 11631)。使用浮點鍵對
Index物件進行索引已被棄用,並將在將來引發IndexError。您可以手動轉換為整數鍵(GH 34191)。在
Period.to_timestamp()中的tz關鍵字已被棄用,並將在將來的版本中移除;請改用per.to_timestamp(...).tz_localize(tz)(GH 34522)。DatetimeIndex.to_perioddelta()已被棄用,並將在將來的版本中移除。請改用index - index.to_period(freq).to_timestamp()(GH 34853)。DataFrame.melt()接受一個已存在的value_name已被棄用,並將在將來版本中移除(GH 34731)。在
DataFrame.expanding()函式中的center關鍵字已被棄用,並將在將來的版本中移除(GH 20647)。
效能改進#
內部索引方法
_shallow_copy()現在將快取的屬性複製到新索引,從而避免在新索引上重新建立它們。這可以加快許多依賴於建立現有索引副本的操作(GH 28584, GH 32640, GH 32669)。使用
DataFrame.sparse.from_spmatrix()建構函式從scipy.sparse矩陣建立具有稀疏值的DataFrame時,效能顯著提升(GH 32821, GH 32825, GH 32826, GH 32856, GH 32858)。groupby 方法
Groupby.first()和Groupby.last()的效能改進(GH 34178)。對可為空的(整數和布林)dtypes,
factorize()的效能改進(GH 33064)。構建
Categorical物件的效能改進(GH 33921)。修復了
pandas.qcut()和pandas.cut()的效能迴歸(GH 33921)。對可為空的(整數和布林)dtypes 的歸約(
sum,prod,min,max)的效能改進(GH 30982, GH 33261, GH 33442)。RollingGroupby的效能改進(GH 34052)。對
pandas.MultiIndex的算術運算(sub、add、mul、div)進行效能改進(GH 34297)當
bool_indexer是list時,對DataFrame[bool_indexer]進行效能改進(GH 33924)使用多種方式(如
io.formats.style.Styler.apply()、io.formats.style.Styler.applymap()或io.formats.style.Styler.bar())新增樣式後,io.formats.style.Styler.render()的效能有顯著提升(GH 19917)
Bug 修復#
分類#
向
Categorical.take()傳遞無效的fill_value時,現在會引發ValueError而不是TypeError(GH 33660)在
concat()或append()等操作中,將包含缺失值的、具有整數類別的pandas.Categorical與浮點數 dtype 列結合時,現在會產生一個浮點數列而不是 object dtype 列(GH 33607)修復了
merge()無法在非唯一類別索引上進行連線的錯誤(GH 28189)修復了將類別資料傳遞給
pandas.Index建構函式並指定dtype=object時,錯誤地返回pandas.CategoricalIndex而不是 object-dtypepandas.Index的錯誤(GH 32167)修復了
pandas.Categorical的比較運算子__ne__在任一元素缺失時錯誤地評估為False的錯誤(GH 32276)Categorical.fillna()現在接受pandas.Categorical作為other引數(GH 32420)修復了
pandas.Categorical的 repr(表示形式)未區分int和str的問題(GH 33676)
日期時間型別#
將
int64以外的整數 dtype 傳遞給np.array(period_index, dtype=...)時,現在會引發TypeError,而不是錯誤地使用int64(GH 32255)Series.to_timestamp()現在如果 axis 不是pandas.PeriodIndex,會引發TypeError。之前會引發AttributeError(GH 33327)Series.to_period()現在如果 axis 不是pandas.DatetimeIndex,會引發TypeError。之前會引發AttributeError(GH 33327)pandas.Period不再接受元組作為freq引數(GH 34658)修復了
pandas.Timestamp中,從不明確的 epoch 時間構造pandas.Timestamp並再次呼叫建構函式時,Timestamp.value()屬性發生更改的錯誤(GH 24329)修復了
DatetimeArray.searchsorted()、TimedeltaArray.searchsorted()、PeriodArray.searchsorted()未識別非 pandas 標量並錯誤地引發ValueError而不是TypeError的問題(GH 30950)修復了
pandas.Timestamp中,使用 dateutil 時區構造pandas.Timestamp,當時間比夏令時轉換(冬季到夏季)早不到 128 納秒時,會產生不存在時間的錯誤(GH 31043)修復了
Period.to_timestamp()、Period.start_time()在微秒頻率下返回比正確時間早一納秒的時間戳的錯誤(GH 31475)修復了
pandas.Timestamp在年、月或日缺失時丟擲令人困惑的錯誤訊息的問題(GH 31200)修復了
pandas.DatetimeIndex建構函式錯誤地接受bool型別輸入的錯誤(GH 32668)修復了
DatetimeIndex.searchsorted()不接受list或pandas.Series作為其引數的錯誤(GH 32762)修復了
pandas.PeriodIndex()在傳入字串pandas.Series時引發錯誤的 bug(GH 26109)修復了
pandas.Timestamp算術運算中,新增或減去具有timedelta64型別的np.ndarray時出現的錯誤(GH 33296)修復了
DatetimeIndex.to_period()在不帶引數呼叫時,未推斷頻率的錯誤(GH 33358)修復了
DatetimeIndex.tz_localize()在某些情況下不正確地保留freq,即使原始freq已不再有效(GH 30511)修復了
DatetimeIndex.intersection()在某些情況下丟失freq和時區的錯誤(GH 33604)修復了
DatetimeIndex.get_indexer()對於混合日期時間類目標有時會返回錯誤結果的錯誤(GH 33741)修復了
pandas.DatetimeIndex在與某些型別的pandas.tseries.offsets.DateOffset物件進行加減運算時,不正確地保留無效的freq屬性的錯誤(GH 33779)修復了
pandas.DatetimeIndex中,在設定索引的freq屬性時,可能會靜默更改檢視同一資料的另一個索引的freq屬性的問題(GH 33552)當對使用空
pd.to_datetime()初始化的物件呼叫DataFrame.min()和DataFrame.max()時,其結果與Series.min()和Series.max()的結果不一致。修復了
DatetimeIndex.intersection()和TimedeltaIndex.intersection()的結果沒有正確name屬性的錯誤(GH 33904)修復了
DatetimeArray.__setitem__()、TimedeltaArray.__setitem__()、PeriodArray.__setitem__()錯誤地允許int64型別的值被靜默轉換的問題(GH 33717)修復了從
pandas.Period中減去pandas.TimedeltaIndex時,在某些本應成功的情況下錯誤地引發TypeError,並在某些本應引發TypeError的情況下引發IncompatibleFrequency的錯誤(GH 33883)修復了從只讀 NumPy 陣列(非納秒解析度)建立
pandas.Series或pandas.Index時,在時間戳範圍內,會將資料轉換為 object dtype 而不是強制轉換為datetime64[ns]dtype 的錯誤(GH 34843)。Period、date_range()、period_range()、pd.tseries.frequencies.to_offset()中的freq關鍵字不再允許使用元組,請改用字串傳遞(GH 34703)修復了
DataFrame.append()在將包含標量時區感知pandas.Timestamp的pandas.Series追加到一個空的pandas.DataFrame時,錯誤地產生了一個 object 列而不是datetime64[ns, tz]dtype 的問題(GH 35038)OutOfBoundsDatetime在時間戳超出實現邊界時,提供了一個改進的錯誤訊息。(GH 32967)修復了
AbstractHolidayCalendar.holidays()在沒有定義規則時出現的錯誤(GH 31415)修復了
Tick類與 timedelta 類物件進行比較時引發TypeError的錯誤(GH 34088)修復了
Tick類與浮點數相乘時引發TypeError的錯誤(GH 34486)
時間差#
修復了使用高精度整數構造
pandas.Timedelta時,會舍入Timedelta元件的錯誤(GH 31354)修復了將
np.nan或None除以pandas.Timedelta時,錯誤地返回NaT的問題(GH 31869)pandas.Timedelta現在可以識別µs作為微秒的識別符號(GH 32899)當納秒非零時,
pandas.Timedelta的字串表示形式現在包含納秒(GH 9309)修復了比較
pandas.Timedelta物件與具有timedelta64型別的np.ndarray時,錯誤地將所有條目視為不相等的問題(GH 33441)修復了
DataFrame.resample()在邊緣情況下生成額外點的錯誤(GH 30353, GH 13022, GH 33498)修復了
DataFrame.resample()在處理 timedelta 時忽略loffset引數的錯誤(GH 7687, GH 33498)修復了
pandas.Timedelta和pandas.to_timedelta()在字串輸入時忽略unit引數的錯誤(GH 12136)
時區#
修復了
to_datetime()在infer_datetime_format=True時,無法正確解析時區名稱(例如UTC)的錯誤(GH 33133)
數值#
修復了
DataFrame.floordiv()在axis=0時,除以零的處理方式與Series.floordiv()不同(GH 31271)修復了
to_numeric()使用字串引數"uint64"和errors="coerce"時靜默失敗的錯誤(GH 32394)修復了
to_numeric()使用downcast="unsigned"時,對空資料失敗的錯誤(GH 32493)修復了
DataFrame.mean()在numeric_only=False且包含datetime64dtype 或PeriodDtype列時,錯誤地引發TypeError的問題(GH 32426)修復了
DataFrame.count()在使用level="foo"且索引級別"foo"包含 NaN 時導致段錯誤的問題(GH 21824)修復了
DataFrame.diff()在axis=1時,對於混合 dtype 返回錯誤結果的錯誤(GH 32995)修復了
DataFrame.corr()和DataFrame.cov()在處理帶有pandas.NA的可空整數列時引發錯誤的 bug(GH 33803)修復了具有非重疊列且標籤重複的
DataFrame物件之間的算術運算導致無限迴圈的錯誤(GH 35194)修復了
DataFrame和pandas.Series之間 object-dtype 物件與datetime64dtype 物件之間的加減運算錯誤(GH 33824)修復了
Index.difference()在比較Float64Index和 objectpandas.Index時給出錯誤結果的錯誤(GH 35217)修復了
DataFrame約簡操作(例如df.min()、df.max())在處理ExtensionArraydtypes 時出現的錯誤(GH 34520, GH 32651)Series.interpolate()和DataFrame.interpolate()現在如果limit_direction是'forward'或'both'且method是'backfill'或'bfill',或者limit_direction是'backward'或'both'且method是'pad'或'ffill',則會引發 ValueError(GH 34746)
轉換#
修復了從大端位元組序
datetime64dtype 的 NumPy 陣列構造pandas.Series時出現的錯誤(GH 29684)修復了使用較大的納秒關鍵字值構造
pandas.Timedelta時出現的錯誤(GH 32402)修復了
DataFrame建構函式在重複集合而不是引發錯誤時出現的問題(GH 32582)DataFrame建構函式不再接受 DataFrame 物件列表。由於 NumPy 的更改,DataFrame 物件現在被一致地視為二維物件,因此 DataFrame 物件列表被視為三維,不再適用於 DataFrame 建構函式(GH 32289)。修復了
DataFrame在使用列表初始化框架併為MultiIndex分配帶有巢狀列表的columns時出現的錯誤(GH 32173)改進了建立新索引時,無效的列表構造的錯誤訊息(GH 35190)
字串#
Interval#
修復了
IntervalArray在設定值時錯誤地允許更改底層資料的錯誤(GH 32782)
索引#
DataFrame.xs()現在如果提供了level關鍵字且軸不是MultiIndex,則會引發TypeError。之前會引發AttributeError(GH 33610)在具有部分時間戳且丟棄年末、季度末或月末高精度索引的
DatetimeIndex上進行切片時出現錯誤 (GH 31064)PeriodIndex.get_loc()在將較高精度字串與PeriodIndex.get_value()不同的處理方式時出現錯誤 (GH 31172)在
Series.at()和DataFrame.at()中,當查詢Float64Index中的整數時,其行為與.loc不匹配,出現錯誤 (GH 31329)PeriodIndex.is_monotonic()在包含前導NaT條目時錯誤地返回True(GH 31437)DatetimeIndex.get_loc()在使用轉換後的整數鍵而不是使用者傳遞的鍵時引發KeyError錯誤 (GH 31425)Series.xs()在某些 object-dtype 的情況下錯誤地返回Timestamp而不是datetime64(GH 31630)DataFrame.iat()在某些 object-dtype 的情況下錯誤地返回Timestamp而不是datetime(GH 32809)DataFrame.at()在列或索引非唯一時出現錯誤 (GH 33041)Series.loc()和DataFrame.loc()在使用整數鍵索引非全整數的 object-dtypeIndex時出現錯誤 (GH 31905)在具有重複列的
DataFrame上使用DataFrame.iloc.__setitem__()時,錯誤地為所有匹配的列設定了值 (GH 15686, GH 22036)DataFrame.loc()和Series.loc()在使用DatetimeIndex、TimedeltaIndex或PeriodIndex進行查詢時,錯誤地允許查詢不匹配的 datetime 型別的資料 (GH 32650)Series.__getitem__()在使用非標準標量(例如np.dtype)進行索引時出現錯誤 (GH 32684)DataFrame.lookup()在frame.index或frame.columns非唯一時錯誤地引發AttributeError;現在將引發一個帶有有用錯誤訊息的ValueError(GH 33041)DataFrame.copy()在複製後未使 _item_cache 失效,導致複製後的值更新未得到反映 (GH 31784)修復了
DataFrame.loc()和Series.loc()在提供datetime64[ns, tz]值時引發錯誤的迴歸問題 (GH 32395)Series.__getitem__()在使用整數鍵和一個帶有前導整數級別的MultiIndex時,如果鍵在第一個級別不存在,未能引發KeyError(GH 33355)DataFrame.iloc()在對具有ExtensionDtype的單列DataFrame進行切片時(例如df.iloc[:, :1]),返回了無效的結果 (GH 32957)DatetimeIndex.insert()和TimedeltaIndex.insert()在將元素設定到空的Series中時,導致索引freq丟失 (GH 33573)Series.__setitem__()在使用IntervalIndex和整數列表式鍵時出現錯誤 (GH 33473)Series.__getitem__()在使用np.ndarray、Index、Series索引器時允許缺失標籤,但使用list索引時不允許;現在這些都將引發KeyError(GH 33646)DataFrame.truncate()和Series.truncate()在索引被假定為單調遞增時出現錯誤 (GH 33756)在
DatetimeIndex或PeriodIndex上使用表示日期時間的字串列表進行索引時失敗 (GH 11278)Series.at()在與MultiIndex一起使用時,對有效輸入會引發異常 (GH 26989)DataFrame.loc()在使用值字典時,會將int型別的列更改為float型別 (GH 34573)Series.loc()在與MultiIndex一起使用時,訪問None值會引發IndexingError(GH 34318)DataFrame.reset_index()和Series.reset_index()在空DataFrame或帶有MultiIndex的空Series上不會保留資料型別 (GH 19602)Series和DataFrame在使用time鍵在包含NaT條目的DatetimeIndex上進行索引時出現錯誤 (GH 35114)
Missing#
在空的
Series上呼叫fillna()現在會正確返回一個淺複製的物件。該行為現在與Index、DataFrame和非空Series的行為一致 (GH 32543)。Series.replace()在to_replace引數是 dict/list 型別且應用於包含<NA>的Series時,會引發TypeError。該方法現在透過在進行替換比較時忽略<NA>值來處理此問題 (GH 32621)any()和all()在使用可為空的 Boolean 型別並且skipna=False時,對於所有False或所有True值,會錯誤地返回<NA>(GH 33253)關於
interpolate方法使用method=akima的文件已澄清。der引數必須是標量或None(GH 33426)DataFrame.interpolate()現在使用正確的軸約定。之前沿列插值會導致沿索引插值,反之亦然。此外,使用pad、ffill、bfill和backfill方法進行插值與使用DataFrame.fillna()進行填充方法相同 (GH 12918, GH 29146)DataFrame.interpolate()在對列名為字串型別的DataFrame呼叫時會引發 ValueError。現在該方法與列名型別無關 (GH 33956)現在可以將
NA傳遞到格式字串中使用格式說明符。例如,"{:.1f}".format(pd.NA)以前會引發ValueError,但現在會返回字串"<NA>"(GH 34740)Series.map()在na_action無效時未引發錯誤 (GH 32815)
MultiIndex#
DataFrame.swaplevels()現在如果軸不是MultiIndex,則會引發TypeError。之前會引發AttributeError(GH 31126)Dataframe.loc()在與MultiIndex一起使用時出現錯誤。返回的值與輸入值的順序不一致 (GH 22797)
In [79]: df = pd.DataFrame(np.arange(4),
....: index=[["a", "a", "b", "b"], [1, 2, 1, 2]])
....:
# Rows are now ordered as the requested keys
In [80]: df.loc[(['b', 'a'], [2, 1]), :]
Out[80]:
0
b 2 3
1 2
a 2 1
1 0
MultiIndex.intersection()在sort=False時不保證保留順序。 (GH 31325)DataFrame.truncate()丟棄了MultiIndex的名稱。 (GH 34564)
In [81]: left = pd.MultiIndex.from_arrays([["b", "a"], [2, 1]])
In [82]: right = pd.MultiIndex.from_arrays([["a", "b", "c"], [1, 2, 3]])
# Common elements are now guaranteed to be ordered by the left side
In [83]: left.intersection(right, sort=False)
Out[83]:
MultiIndex([('b', 2),
('a', 1)],
)
連線兩個
MultiIndex時,未指定級別且具有不同列的情況下出現錯誤。Return-indexers 引數被忽略。 (GH 34074)
IO#
將
set作為names引數傳遞給pandas.read_csv()、pandas.read_table()或pandas.read_fwf()時,會引發ValueError: Names should be an ordered collection.(GH 34946)在
display.precision為零時列印輸出出現錯誤。 (GH 20359)read_json()在 JSON 包含大數字字串時發生整數溢位錯誤 (GH 30320)read_csv()當header和prefix引數均不為None時,將引發ValueError。 (GH 27394)DataFrame.to_json()在path_or_buf是 S3 URI 時引發NotFoundError(GH 28375)DataFrame.to_parquet()覆蓋了 pyarrow 對coerce_timestamps的預設設定;遵循 pyarrow 的預設設定允許使用version="2.0"寫入納秒時間戳 (GH 31652)。read_csv()在sep=None與comment關鍵字組合使用時引發TypeError(GH 31396)HDFStore在讀取 Python 2 中寫入的固定格式DataFrame時,導致datetime64列的 dtype 被設定為int64(GH 31750)read_sas()現在可以處理大於Timestamp.max的日期和時間,並將它們返回為datetime.datetime物件 (GH 20927)DataFrame.to_json()在date_format="iso"時,Timedelta物件無法正確序列化 (GH 28256)read_csv()當parse_dates中傳入的列名在DataFrame中缺失時,將引發ValueError(GH 31251)read_excel()在 UTF-8 字串包含高位代理字元時,會導致分段錯誤 (GH 23809)read_csv()在處理空檔案時導致檔案描述符洩露 (GH 31488)read_csv()在頭部和資料行之間存在空行時,導致了段錯誤 (GH 28071)read_csv()在許可權問題時引發了誤導性的異常 (GH 23784)read_csv()在header=None且存在兩個額外資料列時,引發了IndexErrorread_sas()在從 Google Cloud Storage 讀取檔案時引發了AttributeError(GH 33069)DataFrame.to_sql() 中存在一個錯誤,當儲存越界日期時會引發 AttributeError (GH 26761)
read_excel() 中存在一個錯誤,在處理 OpenDocument 文字單元格中的多個嵌入空格時未能正確處理。 (GH 32207)
read_json() 中存在一個錯誤,在將布林值列表讀取到 Series 時會引發 TypeError。 (GH 31464)
pandas.io.json.json_normalize() 中存在一個錯誤,其中 record_path 指定的位置不指向陣列。 (GH 26284)
pandas.read_hdf() 在載入不支援的 HDF 檔案時會提供更明確的錯誤訊息 (GH 9539)
read_feather() 中存在一個錯誤,在讀取 s3 或 http 檔案路徑時會引發 ArrowIOError (GH 29055)
to_excel() 中存在一個錯誤,無法處理列名 'render' 並會引發 KeyError (GH 34331)
execute() 中存在一個錯誤,當 SQL 語句包含 '%' 字元且沒有引數時,對於某些 DB-API 驅動程式會引發 ProgrammingError (GH 34211)
StataReader() 中存在一個錯誤,在透過迭代器讀取資料時會導致分類變數具有不同的 dtypes。 (GH 31544)
HDFStore.keys() 現在有一個可選的 include 引數,允許檢索所有本地 HDF5 表名 (GH 29916)
read_csv() 和 read_table() 引發的 TypeError 異常,當傳入非預期的關鍵字引數時,會顯示為 parser_f (GH 25648)
read_excel() 對於 ODS 檔案存在一個錯誤,會刪除 0.0 值 (GH 27222)
ujson.encode() 中存在一個錯誤,當數字大於 sys.maxsize 時會引發 OverflowError (GH 34395)
HDFStore.append_to_multiple() 中存在一個錯誤,當設定 min_itemsize 引數時會引發 ValueError (GH 11238)
create_table() 中存在一個錯誤,現在當 data_columns 中的 column 引數未指定時會引發錯誤 (GH 28156)
read_json() 現在可以從檔案 URL 讀取行分隔的 JSON 檔案,其中 lines 和 chunksize 已設定。
DataFrame.to_sql() 中存在一個錯誤,當讀取帶有 -np.inf 條目的 DataFrame 到 MySQL 時,現在會提供更明確的 ValueError (GH 34431)
大寫副檔名未被 read_* 函式解壓縮的錯誤 (GH 35164)
read_excel() 中存在一個錯誤,當 header=None 且 index_col 被指定為列表時會引發 TypeError (GH 31783)
read_excel() 中存在一個錯誤,當 datetime 值用在 MultiIndex 的 header 中時 (GH 34748)
read_excel() 不再接受 **kwds 引數。這意味著傳入關鍵字引數 chunksize 現在會引發 TypeError (以前引發 NotImplementedError),而傳入關鍵字引數 encoding 現在會引發 TypeError (GH 34464)
DataFrame.to_records() 中存在一個錯誤,在處理時區感知的 datetime64 列時會錯誤地丟失時區資訊 (GH 32535)
繪圖#
DataFrame.plot() 對於 line/bar 現在接受按字典顏色 (GH 8193)。
DataFrame.plot.hist() 中存在一個錯誤,當使用權重時,對於多個列不起作用 (GH 33173)
DataFrame.boxplot() 和 DataFrame.plot.boxplot() 中存在一個錯誤,會丟失 medianprops, whiskerprops, capprops 和 boxprops 的顏色屬性 (GH 30346)
DataFrame.hist() 中存在一個錯誤,其中 column 引數的順序被忽略 (GH 29235)
DataFrame.plot.scatter() 中存在一個錯誤,當使用不同的 cmap 新增多個繪圖時,色條始終使用第一個 cmap (GH 33389)
DataFrame.plot.scatter() 中存在一個錯誤,即使 c 引數被分配給包含顏色名稱的列,也會向繪圖新增色條 (GH 34316)
pandas.plotting.bootstrap_plot() 中存在一個錯誤,導致座標軸混亂和標籤重疊 (GH 34905)
DataFrame.plot.scatter() 中存在一個錯誤,在繪製可變標記大小時會引發錯誤 (GH 32904)
GroupBy/resample/rolling
使用 count、min、max、median、skew、cov、corr 的 pandas.api.indexers.BaseIndexer 現在將為任何單調的 pandas.api.indexers.BaseIndexer 後代返回正確的結果 (GH 32865)
DataFrameGroupby.mean() 和 SeriesGroupby.mean() (以及 median()、std() 和 var() 類似) 現在如果傳入非接受的關鍵字引數,將引發 TypeError。以前會引發 UnsupportedFunctionCall (如果 min_count 傳入 median(),則為 AssertionError) (GH 31485)
DataFrameGroupBy.apply() 和 SeriesGroupBy.apply() 中存在一個錯誤,當 by 軸未排序、存在重複項,並且應用的 func 不會修改傳入的物件時會引發 ValueError (GH 30667)
DataFrameGroupby.transform() 中存在一個錯誤,在使用轉換函式時產生不正確的結果 (GH 30918)
DataFrameGroupBy.transform() 和 SeriesGroupBy.transform() 中存在一個錯誤,當按多個鍵分組,其中一些是分類的而另一些不是時,會返回錯誤的結果 (GH 32494)
DataFrameGroupBy.count() 和 SeriesGroupBy.count() 中存在一個錯誤,當分組列包含 NaN 時會導致分段錯誤 (GH 32841)
DataFrame.groupby() 和 Series.groupby() 中存在一個錯誤,當聚合布林 Series 時產生不一致的型別 (GH 32894)
DataFrameGroupBy.sum() 和 SeriesGroupBy.sum() 中存在一個錯誤,當非空值的數量低於 nullable integer dtypes 的 min_count 時,會返回一個很大的負數 (GH 32861)
SeriesGroupBy.quantile() 中存在一個錯誤,在處理 nullable integers 時會引發錯誤 (GH 33136)
DataFrame.resample() 中存在一個錯誤,當生成的時區感知 DatetimeIndex 在午夜發生 DST 轉換時會引發 AmbiguousTimeError (GH 25758)
DataFrame.groupby() 中存在一個錯誤,當按具有隻讀類別且 sort=False 的分類列分組時會引發 ValueError (GH 33410)
DataFrameGroupBy.agg(), SeriesGroupBy.agg(), DataFrameGroupBy.transform(), SeriesGroupBy.transform(), DataFrameGroupBy.resample(), 和 SeriesGroupBy.resample() 中存在一個錯誤,其中子類未被保留 (GH 28330)
SeriesGroupBy.agg() 中存在一個錯誤,之前允許 SeriesGroupBy 的命名聚合中接受任何列名。現在的行為只允許 str 和可呼叫項,否則會引發 TypeError。 (GH 34422)
DataFrame.groupby() 中存在一個錯誤,當 agg 鍵引用一個空列表時,會丟失 Index 的名稱 (GH 32580)
Rolling.apply() 中存在一個錯誤,當指定 engine='numba' 時,center=True 被忽略 (GH 34784)
DataFrame.ewm.cov() 中存在一個錯誤,當輸入為 MultiIndex 時會引發 AssertionError (GH 34440)
core.groupby.DataFrameGroupBy.quantile() 中存在一個錯誤,對於非數值型別會引發 TypeError,而不是刪除列 (GH 27892)
core.groupby.DataFrameGroupBy.transform() 中存在一個錯誤,當 func='nunique' 且列為 datetime64 型別時,結果也會是 datetime64 型別,而不是 int64 (GH 35109)
DataFrame.groupby() 中存在一個錯誤,當選擇一列並以 as_index=False 進行聚合時會引發 AttributeError (GH 35246)。
DataFrameGroupBy.first() 和 DataFrameGroupBy.last() 中存在一個錯誤,當按多個 Categoricals 分組時會引發不必要的 ValueError (GH 34951)
Reshaping#
影響所有數值和布林歸約方法未返回子類資料型別的錯誤。 (GH 25596)
DataFrame.pivot_table() 中存在一個錯誤,當僅設定 MultiIndexed 列時 (GH 17038)
DataFrame.unstack() 和 Series.unstack() 中存在一個錯誤,可以接受 MultiIndexed 資料中的元組名稱 (GH 19966)
DataFrame.pivot_table() 中存在一個錯誤,當 margin 為 True 且僅定義 column 時 (GH 31016)
DataFrame.pivot() 中當 columns 設定為 None 時的不正確錯誤訊息已被修復。 (GH 30924)
crosstab() 中存在一個錯誤,當輸入是兩個 Series 且具有元組名稱時,輸出將保留一個虛擬 MultiIndex 作為列。 (GH 18321)
DataFrame.pivot() 現在可以接受 lists 作為 index 和 columns 引數 (GH 21425)
concat() 中存在一個錯誤,當 copy=True 時,結果索引未被複制 (GH 29879)
SeriesGroupBy.aggregate() 中存在一個錯誤,當聚合共享相同名稱時,聚合結果會被覆蓋 (GH 30880)
Index.astype() 在從 Float64Index 轉換為 Int64Index 或轉換為 ExtensionArray dtype 時會丟失 name 屬性的錯誤 (GH 32013)
Series.append() 現在當傳入 DataFrame 或包含 DataFrame 的序列時將引發 TypeError (GH 31413)
DataFrame.replace() 和 Series.replace() 如果 to_replace 不是預期的型別,將引發 TypeError。以前 replace 會靜默失敗 (GH 18634)
Series 的 inplace 操作存在錯誤,該操作將從 DataFrame 中新增一個已刪除的列 (使用 inplace=True) (GH 30484)
DataFrame.apply() 中存在一個錯誤,即使請求了 raw=True,回撥函式仍會以 Series 引數被呼叫。 (GH 32423)
DataFrame.pivot_table() 中存在一個錯誤,在從具有時區感知 dtype 的列建立 MultiIndex 級別時丟失時區資訊 (GH 32558)
concat() 中存在一個錯誤,當將非 dict 對映作為 objs 傳遞時會引發 TypeError (GH 32863)
DataFrame.agg() 現在在嘗試聚合不存在的列時提供更具描述性的 SpecificationError 訊息 (GH 32755)
DataFrame.unstack() 中存在一個錯誤,當使用 MultiIndex 列和 MultiIndex 行時 (GH 32624, GH 24729 and GH 28306)
將字典追加到 DataFrame 而不傳遞 ignore_index=True 時,將引發 TypeError: Can only append a dict if ignore_index=True,而不是 TypeError: Can only append a :class:`Series` if ignore_index=True or if the :class:`Series` has a name (GH 30871)
Bug in
DataFrame.corrwith(),DataFrame.memory_usage(),DataFrame.dot(),DataFrame.idxmin(),DataFrame.idxmax(),DataFrame.duplicated(),DataFrame.isin(),DataFrame.count(),Series.explode(),Series.asof()andDataFrame.asof()未返回子類型別。( GH 31331)Bug in
Dataframe.aggregate()andSeries.aggregate()在某些情況下導致遞迴迴圈。( GH 34224)Fixed bug in
melt()where meltingMultiIndexcolumns withcol_level > 0would raise aKeyErroronid_vars。( GH 34129)Bug in
Series.where()with an emptySeriesand emptycondhaving non-bool dtype。( GH 34592)Fixed regression where
DataFrame.apply()would raiseValueErrorfor elements withSdtype。( GH 34529)
Sparse#
Creating a
SparseArrayfrom timezone-aware dtype will issue a warning before dropping timezone information, instead of doing so silently。( GH 32501)Bug in
arrays.SparseArray.from_spmatrix()wrongly read scipy sparse matrix。( GH 31991)Bug in
Series.sum()withSparseArrayraised aTypeError。( GH 25777)Bug where
DataFramecontaining an all-sparseSparseArrayfilled withNaNwhen indexed by a list-like。( GH 27781, GH 29563)The repr of
SparseDtypenow includes the repr of itsfill_valueattribute. Previously it usedfill_value’s string representation。( GH 34352)Bug where empty
DataFramecould not be cast toSparseDtype。( GH 33113)Bug in
arrays.SparseArray()was returning the incorrect type when indexing a sparse dataframe with an iterable。( GH 34526, GH 34540)
ExtensionArray#
Fixed bug where
Series.value_counts()would raise on empty input ofInt64dtype。( GH 33317)Fixed bug in
concat()when concatenatingDataFrameobjects with non-overlapping columns resulting in object-dtype columns rather than preserving the extension dtype。( GH 27692, GH 33027)Fixed bug where
StringArray.isna()would returnFalsefor NA values whenpandas.options.mode.use_inf_as_nawas set toTrue。( GH 33655)Fixed bug in
Seriesconstruction with EA dtype and index but no data or scalar data fails。( GH 26469)Fixed bug that caused
Series.__repr__()to crash for extension types whose elements are multidimensional arrays。( GH 33770)Fixed bug where
Series.update()would raise aValueErrorforExtensionArraydtypes with missing values。( GH 33980)Fixed bug where
StringArray.memory_usage()was not implemented。( GH 33963)Fixed bug where
DataFrameGroupBy()would ignore themin_countargument for aggregations on nullable Boolean dtypes。( GH 34051)Fixed bug where the constructor of
DataFramewithdtype='string'would fail。( GH 27953, GH 33623)Bug where
DataFramecolumn set to scalar extension type was considered an object type rather than the extension type。( GH 34832)Fixed bug in
IntegerArray.astype()to correctly copy the mask as well。( GH 34931).
其他#
Set operations on an object-dtype
Indexnow always return object-dtype results。( GH 31401)Fixed
pandas.testing.assert_series_equal()to correctly raise if theleftargument is a different subclass withcheck_series_type=True。( GH 32670).Getting a missing attribute in a
DataFrame.query()orDataFrame.eval()string raises the correctAttributeError。( GH 32408)Fixed bug in
pandas.testing.assert_series_equal()where dtypes were checked forIntervalandExtensionArrayoperands whencheck_dtypewasFalse。( GH 32747)Bug in
DataFrame.__dir__()caused a segfault when using unicode surrogates in a column name。( GH 25509)Bug in
DataFrame.equals()andSeries.equals()in allowing subclasses to be equal。( GH 34402).
貢獻者#
A total of 368 people contributed patches to this release. People with a “+” by their names contributed a patch for the first time.
3vts +
A Brooks +
Abbie Popa +
Achmad Syarif Hidayatullah +
Adam W Bagaskarta +
Adrian Mastronardi +
Aidan Montare +
Akbar Septriyan +
Akos Furton +
Alejandro Hall +
Alex Hall +
Alex Itkes +
Alex Kirko
Ali McMaster +
Alvaro Aleman +
Amy Graham +
Andrew Schonfeld +
Andrew Shumanskiy +
Andrew Wieteska +
Angela Ambroz
Anjali Singh +
Anna Daglis
Anthony Milbourne +
Antony Lee +
Ari Sosnovsky +
Arkadeep Adhikari +
Arunim Samudra +
Ashkan +
Ashwin Prakash Nalwade +
Ashwin Srinath +
Atsushi Nukariya +
Ayappan +
Ayla Khan +
Bart +
Bart Broere +
Benjamin Beier Liu +
Benjamin Fischer +
Bharat Raghunathan
Bradley Dice +
Brendan Sullivan +
Brian Strand +
Carsten van Weelden +
Chamoun Saoma +
ChrisRobo +
Christian Chwala
Christopher Whelan
Christos Petropoulos +
Chuanzhu Xu
CloseChoice +
Clément Robert +
CuylenE +
DanBasson +
Daniel Saxton
Danilo Horta +
DavaIlhamHaeruzaman +
Dave Hirschfeld
Dave Hughes
David Rouquet +
David S +
Deepyaman Datta
Dennis Bakhuis +
Derek McCammond +
Devjeet Roy +
Diane Trout
Dina +
Dom +
Drew Seibert +
EdAbati
Emiliano Jordan +
Erfan Nariman +
Eric Groszman +
Erik Hasse +
Erkam Uyanik +
Evan D +
Evan Kanter +
Fangchen Li +
Farhan Reynaldo +
Farhan Reynaldo Hutabarat +
Florian Jetter +
Fred Reiss +
GYHHAHA +
Gabriel Moreira +
Gabriel Tutui +
Galuh Sahid
Gaurav Chauhan +
George Hartzell +
Gim Seng +
Giovanni Lanzani +
Gordon Chen +
Graham Wetzler +
Guillaume Lemaitre
Guillem Sánchez +
HH-MWB +
Harshavardhan Bachina
How Si Wei
Ian Eaves
Iqrar Agalosi Nureyza +
Irv Lustig
Iva Laginja +
JDkuba
Jack Greisman +
Jacob Austin +
Jacob Deppen +
Jacob Peacock +
Jake Tae +
Jake Vanderplas +
James Cobon-Kerr
Jan Červenka +
Jan Škoda
Jane Chen +
Jean-Francois Zinque +
Jeanderson Barros Candido +
Jeff Reback
Jered Dominguez-Trujillo +
Jeremy Schendel
Jesse Farnham
Jiaxiang
Jihwan Song +
Joaquim L. Viegas +
Joel Nothman
John Bodley +
John Paton +
Jon Thielen +
Joris Van den Bossche
Jose Manuel Martí +
Joseph Gulian +
Josh Dimarsky
Joy Bhalla +
João Veiga +
Julian de Ruiter +
Justin Essert +
Justin Zheng
KD-dev-lab +
Kaiqi Dong
Karthik Mathur +
Kaushal Rohit +
Kee Chong Tan
Ken Mankoff +
Kendall Masse
Kenny Huynh +
Ketan +
Kevin Anderson +
Kevin Bowey +
Kevin Sheppard
Kilian Lieret +
Koki Nishihara +
Krishna Chivukula +
KrishnaSai2020 +
Lesley +
Lewis Cowles +
Linda Chen +
Linxiao Wu +
Lucca Delchiaro Costabile +
MBrouns +
Mabel Villalba
Mabroor Ahmed +
Madhuri Palanivelu +
Mak Sze Chun
Malcolm +
Marc Garcia
Marco Gorelli
Marian Denes +
Martin Bjeldbak Madsen +
Martin Durant +
Martin Fleischmann +
Martin Jones +
Martin Winkel
Martina Oefelein +
Marvzinc +
María Marino +
Matheus Cardoso +
Mathis Felardos +
Matt Roeschke
Matteo Felici +
Matteo Santamaria +
Matthew Roeschke
Matthias Bussonnier
Max Chen
Max Halford +
Mayank Bisht +
Megan Thong +
Michael Marino +
Miguel Marques +
Mike Kutzma
Mohammad Hasnain Mohsin Rajan +
Mohammad Jafar Mashhadi +
MomIsBestFriend
Monica +
Natalie Jann
Nate Armstrong +
Nathanael +
Nick Newman +
Nico Schlömer +
Niklas Weber +
ObliviousParadigm +
Olga Lyashevska +
OlivierLuG +
Pandas Development Team
Parallels +
Patrick +
Patrick Cando +
Paul Lilley +
Paul Sanders +
Pearcekieser +
Pedro Larroy +
Pedro Reys
Peter Bull +
Peter Steinbach +
Phan Duc Nhat Minh +
Phil Kirlin +
Pierre-Yves Bourguignon +
Piotr Kasprzyk +
Piotr Niełacny +
Prakhar Pandey
Prashant Anand +
Puneetha Pai +
Quang Nguyễn +
Rafael Jaimes III +
Rafif +
RaisaDZ +
Rakshit Naidu +
Ram Rachum +
Red +
Ricardo Alanis +
Richard Shadrach +
Rik-de-Kort
Robert de Vries
Robin to Roxel +
Roger Erens +
Rohith295 +
Roman Yurchak
Ror +
Rushabh Vasani
Ryan
Ryan Nazareth
SAI SRAVAN MEDICHERLA +
SHUBH CHATTERJEE +
Sam Cohan
Samira-g-js +
Sandu Ursu +
Sang Agung +
SanthoshBala18 +
Sasidhar Kasturi +
SatheeshKumar Mohan +
Saul Shanabrook
Scott Gigante +
Sebastian Berg +
Sebastián Vanrell
Sergei Chipiga +
Sergey +
ShilpaSugan +
Simon Gibbons
Simon Hawkins
Simon Legner +
Soham Tiwari +
Song Wenhao +
Souvik Mandal
Spencer Clark
Steffen Rehberg +
Steffen Schmitz +
Stijn Van Hoey
Stéphan Taljaard
SultanOrazbayev +
Sumanau Sareen
SurajH1 +
Suvayu Ali +
Terji Petersen
Thomas J Fan +
Thomas Li
Thomas Smith +
Tim Swast
Tobias Pitters +
Tom +
Tom Augspurger
Uwe L. Korn
Valentin Iovene +
Vandana Iyer +
Venkatesh Datta +
Vijay Sai Mutyala +
Vikas Pandey
Vipul Rai +
Vishwam Pandya +
Vladimir Berkutov +
Will Ayd
Will Holmgren
William +
William Ayd
Yago González +
Yosuke KOBAYASHI +
Zachary Lawrence +
Zaky Bilfagih +
Zeb Nicholls +
alimcmaster1
alm +
andhikayusup +
andresmcneill +
avinashpancham +
benabel +
bernie gray +
biddwan09 +
brock +
chris-b1
cleconte987 +
dan1261 +
david-cortes +
davidwales +
dequadras +
dhuettenmoser +
dilex42 +
elmonsomiat +
epizzigoni +
fjetter
gabrielvf1 +
gdex1 +
gfyoung
guru kiran +
h-vishal
iamshwin
jamin-aws-ospo +
jbrockmendel
jfcorbett +
jnecus +
kernc
kota matsuoka +
kylekeppler +
leandermaben +
link2xt +
manoj_koneni +
marydmit +
masterpiga +
maxime.song +
mglasder +
moaraccounts +
mproszewska
neilkg
nrebena
ossdev07 +
paihu
pan Jacek +
partev +
patrick +
pedrooa +
pizzathief +
proost
pvanhauw +
rbenes
rebecca-palmer
rhshadrach +
rjfs +
s-scherrer +
sage +
sagungrp +
salem3358 +
saloni30 +
smartswdeveloper +
smartvinnetou +
themien +
timhunderwood +
tolhassianipar +
tonywu1999
tsvikas
tv3141
venkateshdatta1993 +
vivikelapoutre +
willbowditch +
willpeppo +
za +
zaki-indra +