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

EA: tighten TimedeltaArray._from_sequence signature #36731

Merged
merged 2 commits into from
Oct 2, 2020

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

xref #36718

return result

@classmethod
def _from_sequence_not_strict(
Copy link
Contributor

Choose a reason for hiding this comment

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

umm, have we standarized on this naming? or even the concept of 2 from_sequence?
cc @jorisvandenbossche @TomAugspurger

IIRC we had a need for a coerce= keyword that we nixed for StringArray

Copy link
Contributor

Choose a reason for hiding this comment

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

xref #36718 as well

Copy link
Member Author

Choose a reason for hiding this comment

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

yah my best guess is we're gonna end up dropping this method altogether and having it only reached via the DTI/TDI constructors

Copy link
Contributor

Choose a reason for hiding this comment

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

ok as a temporary work-around prob ok.

Copy link
Member Author

Choose a reason for hiding this comment

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

yah, there's also more work to do in tightening what dtypes _from_sequence accepts, plenty left to do

@jreback jreback added API - Consistency Internal Consistency of API/Behavior ExtensionArray Extending pandas with custom dtypes or arrays. labels Oct 2, 2020
@jreback jreback added this to the 1.2 milestone Oct 2, 2020
@jreback jreback merged commit cc238b9 into pandas-dev:master Oct 2, 2020
@jbrockmendel jbrockmendel deleted the strict-tda branch October 3, 2020 00:24
@jorisvandenbossche
Copy link
Member

I am not sure this actually makes sense. Based on the discussion in #36718 (but we should first futher discuss that), we would rather make _from_sequence the non-strict version, so the other way around as you did here (now, it's only naming, so easy to change later of course)

@jbrockmendel
Copy link
Member Author

@jorisvandenbossche there isn't a whole lot of discussion in #36718. did you mean #33254?

@jorisvandenbossche
Copy link
Member

there isn't a whole lot of discussion in #36718. did you mean #33254?

Yes, indeed, sorry for the typo ;)
Will take a look at your comment over there now!

kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API - Consistency Internal Consistency of API/Behavior ExtensionArray Extending pandas with custom dtypes or arrays.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants