Skip to content

Commit d91b13b

Browse files
SNOW-2202094: Remove references to pandas versions in docstrings (#3545)
1 parent 61e5221 commit d91b13b

File tree

8 files changed

+23
-83
lines changed

8 files changed

+23
-83
lines changed

src/snowflake/snowpark/modin/plugin/docstrings/base.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2879,24 +2879,12 @@ def sample():
28792879
random_state : int, array-like, BitGenerator, np.random.RandomState, np.random.Generator, optional
28802880
If int, array-like, or BitGenerator, seed for random number generator.
28812881
If np.random.RandomState or np.random.Generator, use as given.
2882-
2883-
.. versionchanged:: 1.1.0
2884-
2885-
array-like and BitGenerator object now passed to np.random.RandomState()
2886-
as seed
2887-
2888-
.. versionchanged:: 1.4.0
2889-
2890-
np.random.Generator objects now accepted
2891-
28922882
axis : {0 or ‘index’, 1 or ‘columns’, None}, default None
28932883
Axis to sample. Accepts axis number or name. Default is stat axis
28942884
for given data type. For `Series` this parameter is unused and defaults to `None`.
28952885
ignore_index : bool, default False
28962886
If True, the resulting index will be labeled 0, 1, …, n - 1.
28972887
2898-
.. versionadded:: 1.3.0
2899-
29002888
Returns
29012889
-------
29022890
Series or DataFrame

src/snowflake/snowpark/modin/plugin/docstrings/dataframe.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,7 @@ def dropna():
234234
* 0, or 'index' : Drop rows which contain missing values.
235235
* 1, or 'columns' : Drop columns which contain missing value.
236236
237-
.. versionchanged:: 1.0.0
238-
239-
Pass tuple or list to drop on multiple axes.
240-
Only a single axis is allowed.
237+
Only a single axis is allowed.
241238
242239
how : {'any', 'all'}, default 'any'
243240
Determine if row or column is removed from DataFrame, when we have
@@ -1181,9 +1178,6 @@ def bfill():
11811178
- None: No fill restriction.
11821179
- ‘inside’: Only fill NaNs surrounded by valid values (interpolate).
11831180
- ‘outside’: Only fill NaNs outside valid values (extrapolate).
1184-
1185-
New in version 2.2.0.
1186-
11871181
downcast : dict, default is None
11881182
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).
11891183
@@ -1517,9 +1511,6 @@ def ffill():
15171511
- None: No fill restriction.
15181512
- ‘inside’: Only fill NaNs surrounded by valid values (interpolate).
15191513
- ‘outside’: Only fill NaNs outside valid values (extrapolate).
1520-
1521-
New in version 2.2.0.
1522-
15231514
downcast : dict, default is None
15241515
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).
15251516
@@ -1694,9 +1685,6 @@ def from_dict():
16941685
Of the form {field : array-like} or {field : dict}.
16951686
orient : {‘columns’, ‘index’, ‘tight’}, default ‘columns’
16961687
The “orientation” of the data. If the keys of the passed dict should be the columns of the resulting DataFrame, pass ‘columns’ (default). Otherwise if the keys should be rows, pass ‘index’. If ‘tight’, assume a dict with keys [‘index’, ‘columns’, ‘data’, ‘index_names’, ‘column_names’].
1697-
1698-
Added in version 1.4.0: ‘tight’ as an allowed value for the orient argument
1699-
17001688
dtype : dtype, default None
17011689
Data type to force after DataFrame construction, otherwise infer.
17021690
columns : list, default None
@@ -5031,8 +5019,6 @@ def map():
50315019
"""
50325020
Apply a function to a Dataframe elementwise.
50335021
5034-
Added in version 2.1.0: DataFrame.applymap was deprecated and renamed to DataFrame.map.
5035-
50365022
This method applies a function that accepts and returns a scalar to every element of a DataFrame.
50375023
50385024
Parameters

src/snowflake/snowpark/modin/plugin/docstrings/general.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,8 +1904,6 @@ def date_range():
19041904
Name of the resulting DatetimeIndex.
19051905
inclusive : {"both", "neither", "left", "right"}, default "both"
19061906
Include boundaries; Whether to set each bound as closed or open.
1907-
1908-
.. versionadded:: 1.4.0
19091907
**kwargs
19101908
For compatibility. Has no effect on the result.
19111909
@@ -2067,8 +2065,6 @@ def bdate_range():
20672065
are passed.
20682066
inclusive : {"both", "neither", "left", "right"}, default "both"
20692067
Include boundaries; Whether to set each bound as closed or open.
2070-
2071-
.. versionadded:: 1.4.0
20722068
**kwargs
20732069
For compatibility. Has no effect on the result.
20742070

src/snowflake/snowpark/modin/plugin/docstrings/groupby.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,8 @@ def idxmax():
565565
566566
Snowpark pandas does not support axis=1, since it is deprecated in pandas.
567567
568-
.. deprecated:: 2.1.0
569-
For axis=1, operate on the underlying object instead. Otherwise,
570-
the axis keyword is not necessary.
568+
Deprecated: For axis=1, operate on the underlying object instead. Otherwise,
569+
the axis keyword is not necessary.
571570
572571
skipna : bool, default True
573572
Exclude NA/null values. If an entire row/column is NA, the result
@@ -658,9 +657,8 @@ def idxmin():
658657
659658
Snowpark pandas does not support axis=1, since it is deprecated in pandas.
660659
661-
.. deprecated:: 2.1.0
662-
For axis=1, operate on the underlying object instead. Otherwise,
663-
the axis keyword is not necessary.
660+
Deprecated: For axis=1, operate on the underlying object instead. Otherwise,
661+
the axis keyword is not necessary.
664662
665663
skipna : bool, default True
666664
Exclude NA/null values. If an entire row/column is NA, the result
@@ -936,14 +934,13 @@ def pct_change():
936934
fill_method : {"bfill", "ffill", "pad"}, default "ffill"
937935
How to handle NAs before computing percent changes.
938936
939-
.. deprecated:: 2.1.0
940-
All options of fill_method are deprecated except fill_method=None.
937+
Deprecated: All options of fill_method are deprecated except fill_method=None.
941938
942939
limit : int, optional
943940
The number of consecutive NAs to fill before stopping.
944941
Snowpark pandas does not yet support this parameter.
945942
946-
.. deprecated:: 2.1.0
943+
Deprecated.
947944
948945
freq : DateOffset, timedelta, or str, optional
949946
Increment to use from time series API (e.g. ‘ME’ or BDay()).
@@ -1462,9 +1459,8 @@ def rank():
14621459
14631460
Snowpark pandas does not currently support axis=1, since it is deprecated in pandas.
14641461
1465-
.. deprecated:: 2.1.0
1466-
For axis=1, operate on the underlying object instead. Otherwise,
1467-
the axis keyword is not necessary.
1462+
Deprecated: For axis=1, operate on the underlying object instead. Otherwise,
1463+
the axis keyword is not necessary.
14681464
14691465
14701466
Returns

src/snowflake/snowpark/modin/plugin/docstrings/index.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -976,8 +976,7 @@ def is_boolean():
976976
"""
977977
Check if the Index only consists of booleans.
978978
979-
.. deprecated:: 2.0.0
980-
Use `pandas.api.types.is_bool_dtype` instead.
979+
Deprecated: Use `pandas.api.types.is_bool_dtype` instead.
981980
982981
Returns
983982
-------
@@ -1012,8 +1011,7 @@ def is_floating():
10121011
"""
10131012
Check if the Index is a floating type.
10141013
1015-
.. deprecated:: 2.0.0
1016-
Use `pandas.api.types.is_float_dtype` instead
1014+
Deprecated: Use `pandas.api.types.is_float_dtype` instead.
10171015
10181016
The Index may consist of only floats, NaNs, or a mix of floats,
10191017
integers, or NaNs.
@@ -1056,8 +1054,7 @@ def is_integer():
10561054
"""
10571055
Check if the Index only consists of integers.
10581056
1059-
.. deprecated:: 2.0.0
1060-
Use `pandas.api.types.is_integer_dtype` instead.
1057+
Deprecated: Use `pandas.api.types.is_integer_dtype` instead.
10611058
10621059
Returns
10631060
-------
@@ -1092,8 +1089,7 @@ def is_interval():
10921089
"""
10931090
Check if the Index holds Interval objects.
10941091
1095-
.. deprecated:: 2.0.0
1096-
Use `isinstance(index.dtype, pd.IntervalDtype)` instead.
1092+
Deprecated: Use `isinstance(index.dtype, pd.IntervalDtype)` instead.
10971093
10981094
Returns
10991095
-------
@@ -1115,8 +1111,7 @@ def is_numeric():
11151111
"""
11161112
Check if the Index only consists of numeric data.
11171113
1118-
.. deprecated:: 2.0.0
1119-
Use `pandas.api.types.is_numeric_dtype` instead.
1114+
Deprecated: Use `pandas.api.types.is_numeric_dtype` instead.
11201115
11211116
Returns
11221117
-------
@@ -1159,8 +1154,7 @@ def is_object():
11591154
"""
11601155
Check if the Index is of the object dtype.
11611156
1162-
.. deprecated:: 2.0.0
1163-
Use `pandas.api.types.is_object_dtype` instead.
1157+
Deprecated: Use `pandas.api.types.is_object_dtype` instead.
11641158
11651159
Returns
11661160
-------

src/snowflake/snowpark/modin/plugin/docstrings/io.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ def read_excel():
542542
If you want to pass in a path object, pandas accepts any os.PathLike.
543543
By file-like object, we refer to objects with a read() method, such as a file handle (e.g. via builtin open function) or StringIO.
544544
545-
Deprecated since version 2.1.0: Passing byte strings is deprecated. To read from a byte string, wrap it in a BytesIO object.
545+
Deprecated: Passing byte strings is deprecated. To read from a byte string, wrap it in a BytesIO object.
546546
547547
sheet_name : str, int, list, or None, default 0
548548
Strings are used for sheet names. Integers are used in zero-indexed sheet positions (chart sheets do not count as a sheet position). Lists of strings/integers are used to request multiple sheets. Specify None to get all worksheets.
@@ -618,20 +618,14 @@ def read_excel():
618618
date_parser : function, optional
619619
Function to use for converting a sequence of string columns to an array of datetime instances. The default uses dateutil.parser.parser to do the conversion. Pandas will try to call date_parser in three different ways, advancing to the next if an exception occurs: 1) Pass one or more arrays (as defined by parse_dates) as arguments; 2) concatenate (row-wise) the string values from the columns defined by parse_dates into a single array and pass that; and 3) call date_parser once for each row using one or more strings (corresponding to the columns defined by parse_dates) as arguments.
620620
621-
Deprecated since version 2.0.0: Use date_format instead, or read in as object and then apply to_datetime() as-needed.
621+
Deprecated: Use date_format instead, or read in as object and then apply to_datetime() as-needed.
622622
623623
date_format : str or dict of column -> format, default None
624624
If used in conjunction with parse_dates, will parse dates according to this format. For anything more complex, please read in as object and then apply to_datetime() as-needed.
625-
626-
Added in version 2.0.0.
627-
628625
thousands : str, default None
629626
Thousands separator for parsing string columns to numeric. Note that this parameter is only necessary for columns stored as TEXT in Excel, any numeric columns will automatically be parsed, regardless of display format.
630627
decimal : str, default ‘.’
631628
Character to recognize as decimal point for parsing string columns to numeric. Note that this parameter is only necessary for columns stored as TEXT in Excel, any numeric columns will automatically be parsed, regardless of display format.(e.g. use ‘,’ for European data).
632-
633-
Added in version 1.4.0.
634-
635629
comment : str, default None
636630
Comments out remainder of line. Pass a character or characters to this argument to indicate comments in the input file. Any data between the comment string and the end of the current line is ignored.
637631
skipfooter : int, default 0
@@ -642,9 +636,6 @@ def read_excel():
642636
Back-end data type applied to the resultant DataFrame (still experimental). Behaviour is as follows:
643637
- "numpy_nullable": returns nullable-dtype-backed DataFrame (default).
644638
- "pyarrow": returns pyarrow-backed nullable ArrowDtype DataFrame.
645-
646-
Added in version 2.0.
647-
648639
engine_kwargs : dict, optional
649640
Arbitrary keyword arguments passed to excel engine.
650641

src/snowflake/snowpark/modin/plugin/docstrings/series.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -813,13 +813,10 @@ def bfill():
813813
- None: No fill restriction.
814814
- ‘inside’: Only fill NaNs surrounded by valid values (interpolate).
815815
- ‘outside’: Only fill NaNs outside valid values (extrapolate).
816-
817-
New in version 2.2.0.
818-
819816
downcast : dict, default is None
820817
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).
821818
822-
Deprecated since version 2.2.0.
819+
Deprecated parameter.
823820
824821
Returns
825822
-------
@@ -1422,8 +1419,6 @@ def case_when():
14221419
must not change the input Series
14231420
(though pandas doesn`t check it).
14241421
1425-
.. versionadded:: 2.2.0
1426-
14271422
Returns
14281423
-------
14291424
Series
@@ -1464,13 +1459,10 @@ def ffill():
14641459
- None: No fill restriction.
14651460
- ‘inside’: Only fill NaNs surrounded by valid values (interpolate).
14661461
- ‘outside’: Only fill NaNs outside valid values (extrapolate).
1467-
1468-
New in version 2.2.0.
1469-
14701462
downcast : dict, default is None
14711463
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).
14721464
1473-
Deprecated since version 2.2.0.
1465+
Deprecated parameter.
14741466
14751467
Returns
14761468
-------
@@ -1525,8 +1517,7 @@ def fillna():
15251517
* ffill: propagate last valid observation forward to next valid.
15261518
* backfill / bfill: use next valid observation to fill gap.
15271519
1528-
.. deprecated:: 2.1.0
1529-
Use ffill or bfill instead.
1520+
Deprecated: Use ffill or bfill instead.
15301521
15311522
axis : {axes_single_arg}
15321523
Axis along which to fill missing values. For `Series`
@@ -1547,7 +1538,7 @@ def fillna():
15471538
or the string 'infer' which will try to downcast to an appropriate
15481539
equal type (e.g. float64 to int64 if possible).
15491540
1550-
.. deprecated:: 2.2.0
1541+
Deprecated parameter.
15511542
15521543
Returns
15531544
-------

src/snowflake/snowpark/modin/plugin/docstrings/timedelta_index.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ def __new__():
3838
unit : {'D', 'h', 'm', 's', 'ms', 'us', 'ns'}, optional
3939
The unit of ``data``.
4040
41-
.. deprecated:: 2.2.0
42-
Use ``pd.to_timedelta`` instead.
41+
Deprecated: Use ``pd.to_timedelta`` instead.
4342
4443
freq : str or pandas offset object, optional
4544
One of pandas date offset strings or corresponding objects. The string
@@ -70,8 +69,7 @@ def __init__() -> None:
7069
unit : {'D', 'h', 'm', 's', 'ms', 'us', 'ns'}, optional
7170
The unit of ``data``.
7271
73-
.. deprecated:: 2.2.0
74-
Use ``pd.to_timedelta`` instead.
72+
Deprecated: Use ``pd.to_timedelta`` instead.
7573
7674
freq : str or pandas offset object, optional
7775
One of pandas date offset strings or corresponding objects. The string

0 commit comments

Comments
 (0)