You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/snowflake/snowpark/modin/plugin/docstrings/dataframe.py
+143-7Lines changed: 143 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1181,7 +1181,7 @@ def bfill():
1181
1181
downcast : dict, default is None
1182
1182
A dict of item->dtype of what to downcast if possible, or the string ‘infer’ which will try to downcast to an appropriate equal type (e.g. float64 to int64 if possible).
1183
1183
1184
-
Deprecated since version 2.2.0.
1184
+
Deprecated parameter.
1185
1185
1186
1186
Returns
1187
1187
-------
@@ -1231,7 +1231,144 @@ def bfill():
1231
1231
1232
1232
defboxplot():
1233
1233
"""
1234
-
Make a box plot from ``DataFrame`` columns.
1234
+
Make a box plot from DataFrame columns.
1235
+
1236
+
Make a box-and-whisker plot from DataFrame columns, optionally grouped by some other columns. A box plot is a method for graphically depicting groups of numerical data through their quartiles. The box extends from the Q1 to Q3 quartile values of the data, with a line at the median (Q2). The whiskers extend from the edges of box to show the range of the data. By default, they extend no more than 1.5 * IQR (IQR = Q3 - Q1) from the edges of the box, ending at the farthest data point within that interval. Outliers are plotted as separate dots.
1237
+
1238
+
For further details see Wikipedia’s entry for [boxplot](https://en.wikipedia.org/wiki/Box_plot).
1239
+
1240
+
Parameters
1241
+
----------
1242
+
column : str or list of str, optional
1243
+
Column name or list of names, or vector. Can be any valid input to pandas.DataFrame.groupby().
1244
+
1245
+
by : str or array-like, optional
1246
+
Column in the DataFrame to pandas.DataFrame.groupby(). One box-plot will be done per value of columns in by.
1247
+
1248
+
ax : object of class matplotlib.axes.Axes, optional
1249
+
The matplotlib axes to be used by boxplot.
1250
+
1251
+
fontsize : float or str
1252
+
Tick label font size in points or as a string (e.g., large).
1253
+
1254
+
rot : float, default 0
1255
+
The rotation angle of labels (in degrees) with respect to the screen coordinate system.
1256
+
1257
+
grid : bool, default True
1258
+
Setting this to True will show the grid.
1259
+
1260
+
fig : sizeA tuple (width, height) in inches
1261
+
The size of the figure to create in matplotlib.
1262
+
1263
+
layout : tuple (rows, columns), optional
1264
+
For example, (3, 5) will display the subplots using 3 rows and 5 columns, starting from the top-left.
1265
+
1266
+
return_type : {‘axes’, ‘dict’, ‘both’} or None, default ‘axes’
1267
+
The kind of object to return. The default is axes.
1268
+
1269
+
- ‘axes’ returns the matplotlib axes the boxplot is drawn on.
1270
+
1271
+
- ‘dict’ returns a dictionary whose values are the matplotlib Lines of the boxplot.
1272
+
1273
+
- ‘both’ returns a namedtuple with the axes and dict.
1274
+
1275
+
- when grouping with by, a Series mapping columns to return_type is returned.
1276
+
1277
+
If return_type is None, a NumPy array of axes with the same shape as layout is returned.
1278
+
1279
+
backend : str, default None
1280
+
Backend to use instead of the backend specified in the option plotting.backend. For instance, ‘matplotlib’. Alternatively, to specify the plotting.backend for the whole session, set pd.options.plotting.backend.
1281
+
1282
+
**kwargs
1283
+
All other plotting keyword arguments to be passed to matplotlib.pyplot.boxplot().
1284
+
1285
+
Returns
1286
+
-------
1287
+
result
1288
+
See Notes.
1289
+
1290
+
See also
1291
+
--------
1292
+
Series.plot.hist
1293
+
Make a histogram.
1294
+
1295
+
matplotlib.pyplot.boxplot
1296
+
Matplotlib equivalent plot.
1297
+
1298
+
Notes
1299
+
-----
1300
+
The return type depends on the return_type parameter:
1301
+
1302
+
- ‘axes’ : object of class matplotlib.axes.Axes
1303
+
1304
+
- ‘dict’ : dict of matplotlib.lines.Line2D objects
1305
+
1306
+
- ‘both’ : a namedtuple with structure (ax, lines)
1307
+
1308
+
For data grouped with by, return a Series of the above or a numpy array:
1309
+
1310
+
- Series
1311
+
1312
+
- array (for return_type = None)
1313
+
1314
+
Use return_type='dict' when you want to tweak the appearance of the lines after plotting. In this case a dict containing the Lines making up the boxes, caps, fliers, medians, and whiskers is returned.
1315
+
1316
+
Examples
1317
+
--------
1318
+
Boxplots can be created for every column in the dataframe by df.boxplot() or indicating the columns to be used:
Additional formatting can be done to the boxplot, like suppressing the grid (grid=False), rotating the labels in the x-axis (i.e. rot=45) or changing the fontsize (i.e. fontsize=15):
The parameter return_type can be used to select the type of element returned by boxplot. When return_type='axes' is selected, the matplotlib axes on which the boxplot is drawn are returned:
A dict of item->dtype of what to downcast if possible, or the string ‘infer’ which will try to downcast to an appropriate equal type (e.g. float64 to int64 if possible).
1516
1653
1517
-
Deprecated since version 2.2.0.
1654
+
Deprecated parameter.
1518
1655
1519
1656
Returns
1520
1657
-------
@@ -1569,8 +1706,7 @@ def fillna():
1569
1706
* ffill: propagate last valid observation forward to next valid.
1570
1707
* backfill / bfill: use next valid observation to fill gap.
1571
1708
1572
-
.. deprecated:: 2.1.0
1573
-
Use ffill or bfill instead.
1709
+
Deprecated: Use ffill or bfill instead.
1574
1710
1575
1711
axis : {axes_single_arg}
1576
1712
Axis along which to fill missing values. For `Series`
@@ -1591,7 +1727,7 @@ def fillna():
1591
1727
or the string 'infer' which will try to downcast to an appropriate
1592
1728
equal type (e.g. float64 to int64 if possible).
1593
1729
1594
-
.. deprecated:: 2.2.0
1730
+
Deprecated parameter.
1595
1731
1596
1732
Returns
1597
1733
-------
@@ -1758,7 +1894,7 @@ def from_records():
1758
1894
data : structured ndarray, sequence of tuples or dicts, or DataFrame
1759
1895
Structured input data.
1760
1896
1761
-
Deprecated since version 2.1.0: Passing a DataFrame is deprecated.
1897
+
Deprecated: Passing a DataFrame is deprecated.
1762
1898
1763
1899
index : str, list of fields, array-like
1764
1900
Field of array to use as the index, alternately a specific set of input labels to use.
0 commit comments