Skip to content

Conversation

mroeschke
Copy link
Member

Went ahead and fixed the other numeric-like dtype checkers

@mroeschke mroeschke added the Arrow pyarrow functionality label Jan 10, 2023
@lukemanley
Copy link
Member

LGTM

Nice. This helps avoid a number of conversions to object dtype, e.g.

import pandas as pd
import numpy as np

ser = pd.Series(np.arange(10**6), dtype="int64[pyarrow]")

%timeit ser.duplicated()

# 403 ms ± 7.19 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)      <- main
# 12.4 ms ± 71.9 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)  <- this PR

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

Small doc fix, otherwise lgtm

@phofl phofl added this to the 2.0 milestone Jan 11, 2023
@phofl phofl merged commit 2797b84 into pandas-dev:main Jan 11, 2023
@phofl
Copy link
Member

phofl commented Jan 11, 2023

thx @mroeschke

Copy link
Contributor

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks as always @mroeschke!

@mroeschke mroeschke deleted the bug/arrow/more_dtype_funcs branch January 11, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: is_integer_dtype returns False for integer ArrowDtypes
4 participants