@@ -46,63 +46,33 @@ def test_concat_empty_dataframe_dtypes(self):
4646 assert result ["b" ].dtype == np .float64
4747 assert result ["c" ].dtype == np .float64
4848
49- def test_empty_frame_dtypes_ftypes (self ):
49+ def test_empty_frame_dtypes (self ):
5050 empty_df = pd .DataFrame ()
5151 tm .assert_series_equal (empty_df .dtypes , pd .Series (dtype = np .object ))
5252
53- # GH 26705 - Assert .ftypes is deprecated
54- with tm .assert_produces_warning (FutureWarning ):
55- tm .assert_series_equal (empty_df .ftypes , pd .Series (dtype = np .object ))
56-
5753 nocols_df = pd .DataFrame (index = [1 , 2 , 3 ])
5854 tm .assert_series_equal (nocols_df .dtypes , pd .Series (dtype = np .object ))
5955
60- # GH 26705 - Assert .ftypes is deprecated
61- with tm .assert_produces_warning (FutureWarning ):
62- tm .assert_series_equal (nocols_df .ftypes , pd .Series (dtype = np .object ))
63-
6456 norows_df = pd .DataFrame (columns = list ("abc" ))
6557 tm .assert_series_equal (
6658 norows_df .dtypes , pd .Series (np .object , index = list ("abc" ))
6759 )
6860
69- # GH 26705 - Assert .ftypes is deprecated
70- with tm .assert_produces_warning (FutureWarning ):
71- tm .assert_series_equal (
72- norows_df .ftypes , pd .Series ("object:dense" , index = list ("abc" ))
73- )
74-
7561 norows_int_df = pd .DataFrame (columns = list ("abc" )).astype (np .int32 )
7662 tm .assert_series_equal (
7763 norows_int_df .dtypes , pd .Series (np .dtype ("int32" ), index = list ("abc" ))
7864 )
79- # GH 26705 - Assert .ftypes is deprecated
80- with tm .assert_produces_warning (FutureWarning ):
81- tm .assert_series_equal (
82- norows_int_df .ftypes , pd .Series ("int32:dense" , index = list ("abc" ))
83- )
8465
8566 odict = OrderedDict
8667 df = pd .DataFrame (odict ([("a" , 1 ), ("b" , True ), ("c" , 1.0 )]), index = [1 , 2 , 3 ])
8768 ex_dtypes = pd .Series (
8869 odict ([("a" , np .int64 ), ("b" , np .bool ), ("c" , np .float64 )])
8970 )
90- ex_ftypes = pd .Series (
91- odict ([("a" , "int64:dense" ), ("b" , "bool:dense" ), ("c" , "float64:dense" )])
92- )
9371 tm .assert_series_equal (df .dtypes , ex_dtypes )
9472
95- # GH 26705 - Assert .ftypes is deprecated
96- with tm .assert_produces_warning (FutureWarning ):
97- tm .assert_series_equal (df .ftypes , ex_ftypes )
98-
9973 # same but for empty slice of df
10074 tm .assert_series_equal (df [:0 ].dtypes , ex_dtypes )
10175
102- # GH 26705 - Assert .ftypes is deprecated
103- with tm .assert_produces_warning (FutureWarning ):
104- tm .assert_series_equal (df [:0 ].ftypes , ex_ftypes )
105-
10676 def test_datetime_with_tz_dtypes (self ):
10777 tzframe = DataFrame (
10878 {
@@ -474,22 +444,6 @@ def test_dtypes_gh8722(self, float_string_frame):
474444 result = df .dtypes
475445 tm .assert_series_equal (result , Series ({0 : np .dtype ("int64" )}))
476446
477- def test_ftypes (self , mixed_float_frame ):
478- frame = mixed_float_frame
479- expected = Series (
480- dict (
481- A = "float32:dense" ,
482- B = "float32:dense" ,
483- C = "float16:dense" ,
484- D = "float64:dense" ,
485- )
486- ).sort_values ()
487-
488- # GH 26705 - Assert .ftypes is deprecated
489- with tm .assert_produces_warning (FutureWarning ):
490- result = frame .ftypes .sort_values ()
491- tm .assert_series_equal (result , expected )
492-
493447 def test_astype_float (self , float_frame ):
494448 casted = float_frame .astype (int )
495449 expected = DataFrame (
0 commit comments