@@ -5746,12 +5746,21 @@ def isin(self, values):
5746
5746
values ).reshape (self .shape ), self .index ,
5747
5747
self .columns )
5748
5748
5749
+ # ----------------------------------------------------------------------
5750
+ # Add plotting methods to DataFrame
5751
+ plot = base .AccessorProperty (gfx .FramePlotMethods , gfx .FramePlotMethods )
5752
+ hist = gfx .hist_frame
5753
+ boxplot = gfx .boxplot_frame
5754
+
5749
5755
5750
5756
DataFrame ._setup_axes (['index' , 'columns' ], info_axis = 1 , stat_axis = 0 ,
5751
5757
axes_are_reversed = True , aliases = {'rows' : 0 })
5752
5758
DataFrame ._add_numeric_operations ()
5753
5759
DataFrame ._add_series_or_dataframe_operations ()
5754
5760
5761
+ ops .add_flex_arithmetic_methods (DataFrame , ** ops .frame_flex_funcs )
5762
+ ops .add_special_arithmetic_methods (DataFrame , ** ops .frame_special_funcs )
5763
+
5755
5764
_EMPTY_SERIES = Series ([])
5756
5765
5757
5766
@@ -6097,28 +6106,3 @@ def _from_nested_dict(data):
6097
6106
6098
6107
def _put_str (s , space ):
6099
6108
return ('%s' % s )[:space ].ljust (space )
6100
-
6101
-
6102
- # ----------------------------------------------------------------------
6103
- # Add plotting methods to DataFrame
6104
- DataFrame .plot = base .AccessorProperty (gfx .FramePlotMethods ,
6105
- gfx .FramePlotMethods )
6106
- DataFrame .hist = gfx .hist_frame
6107
-
6108
-
6109
- @Appender (_shared_docs ['boxplot' ] % _shared_doc_kwargs )
6110
- def boxplot (self , column = None , by = None , ax = None , fontsize = None , rot = 0 ,
6111
- grid = True , figsize = None , layout = None , return_type = None , ** kwds ):
6112
- from pandas .plotting ._core import boxplot
6113
- import matplotlib .pyplot as plt
6114
- ax = boxplot (self , column = column , by = by , ax = ax , fontsize = fontsize ,
6115
- grid = grid , rot = rot , figsize = figsize , layout = layout ,
6116
- return_type = return_type , ** kwds )
6117
- plt .draw_if_interactive ()
6118
- return ax
6119
-
6120
-
6121
- DataFrame .boxplot = boxplot
6122
-
6123
- ops .add_flex_arithmetic_methods (DataFrame , ** ops .frame_flex_funcs )
6124
- ops .add_special_arithmetic_methods (DataFrame , ** ops .frame_special_funcs )
0 commit comments