File tree 1 file changed +24
-0
lines changed
pandas/tests/series/methods
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 21
21
isna ,
22
22
)
23
23
import pandas ._testing as tm
24
+ from pandas .core .arrays import period_array
24
25
25
26
26
27
class TestSeriesFillNA :
@@ -946,3 +947,26 @@ def test_datetime64tz_fillna_round_issue(self):
946
947
)
947
948
948
949
tm .assert_series_equal (filled , expected )
950
+
951
+ def test_fillna_parr (self ):
952
+ # GH-24537
953
+ dti = date_range (
954
+ Timestamp .max - Timedelta (nanoseconds = 10 ), periods = 5 , freq = "ns"
955
+ )
956
+ ser = Series (dti .to_period ("ns" ))
957
+ ser [2 ] = NaT
958
+ arr = period_array (
959
+ [
960
+ Timestamp ("2262-04-11 23:47:16.854775797" ),
961
+ Timestamp ("2262-04-11 23:47:16.854775798" ),
962
+ Timestamp ("2262-04-11 23:47:16.854775798" ),
963
+ Timestamp ("2262-04-11 23:47:16.854775800" ),
964
+ Timestamp ("2262-04-11 23:47:16.854775801" ),
965
+ ],
966
+ freq = "ns" ,
967
+ )
968
+ expected = Series (arr )
969
+
970
+ filled = ser .fillna (method = "pad" )
971
+
972
+ tm .assert_series_equal (filled , expected )
You can’t perform that action at this time.
0 commit comments