Skip to content

API: Series.str-accessor infers dtype (and Index.str does not raise on all-NA) #23167

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

Merged
merged 26 commits into from
Jun 1, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e377b69
API: Series.str-accessor infers dtype
h-vetinari Nov 29, 2018
88b7b53
Forbid encode on pure bytes as well
h-vetinari Nov 29, 2018
b19a40d
Remove merge artefact
h-vetinari Nov 30, 2018
fb7da6b
fix isort
h-vetinari Nov 30, 2018
f8ffb0d
merge in API: fix str-accessor on CategoricalIndex
h-vetinari Dec 2, 2018
4404d4f
Merge remote-tracking branch 'upstream/master' into str_infer
h-vetinari Dec 2, 2018
4aedad4
Merge remote-tracking branch 'upstream/master' into str_infer
h-vetinari Dec 2, 2018
1285fd5
Merge remote-tracking branch 'upstream/master' into str_infer
h-vetinari Dec 3, 2018
332d14b
Review (jreback)
h-vetinari Dec 3, 2018
8716394
Merge remote-tracking branch 'upstream/master' into str_infer
h-vetinari Dec 19, 2018
44a9146
Merge remote-tracking branch 'upstream/master' into str_infer
h-vetinari Mar 4, 2019
e34097f
Add method name for casefold
h-vetinari Mar 4, 2019
25a046c
Adapt error msg
h-vetinari Mar 4, 2019
9307ba1
Merge remote-tracking branch 'upstream/master' into str_infer
h-vetinari Mar 8, 2019
c9c7496
Review (jreback)
h-vetinari Mar 8, 2019
0e0f6b0
Merge remote-tracking branch 'upstream/master' into str_infer
h-vetinari Mar 27, 2019
bf4d7cf
Review (jreback)
h-vetinari Mar 27, 2019
a68ea5f
Merge remote-tracking branch 'upstream/master' into str_infer
h-vetinari May 13, 2019
5ae1533
Merge remote-tracking branch 'upstream/master' into str_infer
h-vetinari May 14, 2019
b8f6792
Merge remote-tracking branch 'upstream/master' into str_infer
h-vetinari May 30, 2019
0c7e233
fix merge artefact
h-vetinari May 30, 2019
1168ca2
Review (jreback)
h-vetinari May 30, 2019
ab980ec
commit whatsnew changes
h-vetinari May 30, 2019
a996889
retrigger azure
h-vetinari May 30, 2019
4adef35
remove mentions of 'unicode'
h-vetinari May 30, 2019
f62e344
improve docstring for ._validate
h-vetinari May 30, 2019
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
Prev Previous commit
Next Next commit
Review (jreback)
  • Loading branch information
h-vetinari committed Dec 3, 2018
commit 332d14b06ca33d8d003ea508c92e9649501ec585
4 changes: 2 additions & 2 deletions doc/source/whatsnew/v0.24.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ Backwards incompatible API changes

- A newly constructed empty :class:`DataFrame` with integer as the ``dtype`` will now only be cast to ``float64`` if ``index`` is specified (:issue:`22858`)
- :meth:`Series.str.cat` will now raise if `others` is a `set` (:issue:`23009`)
- The `.str`-accessor will perform more rigorous type checking for inputs. Previously, some types that were never intended to be used
"worked" purely due to limitations of dtype checking -- e.g. ``bytes``, which is now disabled except for `decode` and `len` (:issue:`23011`, :issue:`23163`)
- The `.str`-accessor will perform more rigorous type checking for inputs. Previously, some types that were never intended to be used,
"worked" due to limitations of dtype checking -- e.g. ``bytes``, which is now disabled except for `decode` and `len` (:issue:`23011`, :issue:`23163`)
- Passing scalar values to :class:`DatetimeIndex` or :class:`TimedeltaIndex` will now raise ``TypeError`` instead of ``ValueError`` (:issue:`23539`)
- ``max_rows`` and ``max_cols`` parameters removed from :class:`HTMLFormatter` since truncation is handled by :class:`DataFrameFormatter` (:issue:`23818`)
- :meth:`read_csv` will now raise a ``ValueError`` if a column with missing values is declared as having dtype ``bool`` (:issue:`20591`)
Expand Down
2 changes: 0 additions & 2 deletions pandas/core/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1777,8 +1777,6 @@ def forbid_nonstring_types(forbidden, name=None):

# deal with None
forbidden = [] if forbidden is None else forbidden
# deal with single string instead of list
forbidden = [forbidden] if isinstance(forbidden, str) else forbidden

allowed_types = {'string', 'unicode', 'empty',
'bytes', 'mixed', 'mixed-integer'} - set(forbidden)
Expand Down