Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation builds with pandas 2 changes #14937

Merged
merged 19 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions docs/cudf/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,6 @@ def on_missing_reference(app, env, node, contnode):
_prefixed_domain_objects[f"{prefix}{name}"] = name

reftarget = node.get("reftarget")
if reftarget == "cudf.core.index.Index":
# We don't exposed docs for `cudf.core.index.Index`
# hence we would want the docstring & mypy references to
# use `cudf.Index`
node["reftarget"] = "cudf.Index"
return contnode
if "namespacecudf" in reftarget:
node["reftarget"] = "cudf"
return contnode
Expand Down
4 changes: 4 additions & 0 deletions docs/cudf/source/user_guide/api_docs/index_objects.rst
Copy link
Contributor

@bdice bdice Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a diff of (documented) Index APIs between cudf (<) and pandas (>). We should make sure we deprecate/drop anything in cudf that was in pandas 1 but deprecated/dropped from pandas 2.

Only in cudf:
< DatetimeIndex.isocalendar
< Index.deserialize
< Index.device_deserialize
< Index.device_serialize
< Index.find_label_range
< Index.from_arrow
< Index.from_pandas
< Index.host_deserialize
< Index.host_serialize
< Index.isnull
< Index.nlevels
< Index.notnull
< Index.serialize
< Index.str
< Index.to_arrow
< Index.to_cupy
< Index.to_dlpack
< Index.to_numpy
< Index.to_pandas
< Index.tolist
< MultiIndex.from_arrow
< RangeIndex.to_arrow
< RangeIndex.to_numpy

Only in pandas 2:
> CategoricalIndex.add_categories
> CategoricalIndex.as_ordered
> CategoricalIndex.as_unordered
> CategoricalIndex.map
> CategoricalIndex.ordered
> CategoricalIndex.remove_categories
> CategoricalIndex.remove_unused_categories
> CategoricalIndex.rename_categories
> CategoricalIndex.reorder_categories
> CategoricalIndex.set_categories
> DatetimeIndex.as_unit
> DatetimeIndex.date
> DatetimeIndex.day_name
> DatetimeIndex.day_of_week
> DatetimeIndex.freq
> DatetimeIndex.freqstr
> DatetimeIndex.indexer_at_time
> DatetimeIndex.indexer_between_time
> DatetimeIndex.inferred_freq
> DatetimeIndex.is_month_end
> DatetimeIndex.is_month_start
> DatetimeIndex.is_quarter_end
> DatetimeIndex.is_quarter_start
> DatetimeIndex.is_year_end
> DatetimeIndex.is_year_start
> DatetimeIndex.mean
> DatetimeIndex.month_name
> DatetimeIndex.normalize
> DatetimeIndex.snap
> DatetimeIndex.std
> DatetimeIndex.strftime
> DatetimeIndex.time
> DatetimeIndex.timetz
> DatetimeIndex.to_period
> DatetimeIndex.to_pydatetime
> DatetimeIndex.tz
> Index.T
> Index.argmax
> Index.argmin
> Index.asof
> Index.asof_locs
> Index.delete
> Index.drop
> Index.droplevel
> Index.get_indexer_for
> Index.get_indexer_non_unique
> Index.identical
> Index.inferred_type
> Index.insert
> Index.is_
> Index.item
> Index.map
> Index.nbytes
> Index.putmask
> Index.ravel
> Index.reindex
> Index.slice_indexer
> Index.slice_locs
> Index.symmetric_difference
> Index.value_counts
> Index.view
> IndexSlice
> IntervalIndex.closed
> IntervalIndex.contains
> IntervalIndex.from_arrays
> IntervalIndex.from_tuples
> IntervalIndex.is_empty
> IntervalIndex.is_non_overlapping_monotonic
> IntervalIndex.is_overlapping
> IntervalIndex.left
> IntervalIndex.length
> IntervalIndex.mid
> IntervalIndex.overlaps
> IntervalIndex.right
> IntervalIndex.set_closed
> IntervalIndex.to_tuples
> MultiIndex.append
> MultiIndex.copy
> MultiIndex.drop
> MultiIndex.dtypes
> MultiIndex.get_loc_level
> MultiIndex.get_locs
> MultiIndex.levshape
> MultiIndex.remove_unused_levels
> MultiIndex.reorder_levels
> MultiIndex.set_codes
> MultiIndex.set_levels
> MultiIndex.sortlevel
> MultiIndex.to_flat_index
> MultiIndex.truncate
> PeriodIndex
> PeriodIndex.asfreq
> PeriodIndex.day
> PeriodIndex.day_of_week
> PeriodIndex.day_of_year
> PeriodIndex.dayofweek
> PeriodIndex.dayofyear
> PeriodIndex.days_in_month
> PeriodIndex.daysinmonth
> PeriodIndex.end_time
> PeriodIndex.freq
> PeriodIndex.freqstr
> PeriodIndex.from_fields
> PeriodIndex.from_ordinals
> PeriodIndex.hour
> PeriodIndex.is_leap_year
> PeriodIndex.minute
> PeriodIndex.month
> PeriodIndex.quarter
> PeriodIndex.qyear
> PeriodIndex.second
> PeriodIndex.start_time
> PeriodIndex.strftime
> PeriodIndex.to_timestamp
> PeriodIndex.week
> PeriodIndex.weekday
> PeriodIndex.weekofyear
> PeriodIndex.year
> RangeIndex.from_range
> TimedeltaIndex.as_unit
> TimedeltaIndex.ceil
> TimedeltaIndex.floor
> TimedeltaIndex.mean
> TimedeltaIndex.round
> TimedeltaIndex.to_pytimedelta

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's handle these in a follow-up PR. We''ll need to look case-by-case since many if not most of these are likely real differences (cudf features pandas doesn't have or pandas features cudf doesn't have).

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Modifying and computations
.. autosummary::
:toctree: api/

Index.all
Index.any
Index.copy
Index.drop_duplicates
Expand All @@ -60,6 +61,7 @@ Modifying and computations
Index.where
Index.take
Index.unique
Index.nunique

Compatibility with MultiIndex
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -76,7 +78,9 @@ Missing values
Index.fillna
Index.dropna
Index.isna
Index.isnull
Index.notna
Index.notnull

Memory usage
~~~~~~~~~~~~
Expand Down
Loading
Loading