TYP: make dtype required in _from_sequence_of_strings by jbrockmendel · Pull Request #56519 · pandas-dev/pandas (original) (raw)

This method is only ever called with a dtype object. There’s also a recent issue about having a dedicated constructor for inference.

On Sat, Feb 3, 2024 at 2:02 PM Matthew Roeschke ***@***.***> wrote: ***@***.**** commented on this pull request. ------------------------------ In pandas/core/arrays/arrow/array.py <#56519 (comment)>: > @@ -316,7 +318,7 @@ def _from_sequence(@classmethod def _from_sequence_of_strings( - cls, strings, *, dtype: Dtype | None = None, copy: bool = False + cls, strings, *, dtype: ExtensionDtype, copy: bool = False At least for arrow, dtype=None was supposed to mean "let pa.array infer the type", and now that can't be done? — Reply to this email directly, view it on GitHub <#56519 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB5UM6A7CJGWIEV5TNHGKELYR2XXLAVCNFSM6AAAAABAW7H2RSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNRRGEZDQMZQG4> . You are receiving this because you authored the thread.Message ID: ***@***.***>