A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/55709 below:

Index.view _typ check, return type · Issue #55709 · pandas-dev/pandas · GitHub

Index.view has a cls argument (instead of dtype, which I would expect) and starts with:

        # we need to see if we are subclassing an
        # index type here
        if cls is not None and not hasattr(cls, "_typ"):

The "_typ" check must have been intended to catch types defined in pd.core.dtypes.generic, but it isn't clear to me why we do that.

Let's just have view take a dtype keyword like Series.view.

update: also it sometimes returns an Index and other times an ArrayLike. let's choose just one.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4