8000 API: Series.str-accessor infers dtype (and Index.str does not raise on all-NA) by h-vetinari · Pull Request #23167 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

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
Merge remote-tracking branch 'upstream/master' into str_infer
  • Loading branch information
h-vetinari committed Mar 27, 2019
commit 0e0f6b0e1194a2c4563987b18a1dbf5119ae2ef8
6 changes: 3 additions & 3 deletions pandas/core/strings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import codecs
from functools import wraps
import re
import textwrap
import warnings
Expand All @@ -9,7 +10,6 @@
import pandas._libs.lib as lib
import pandas._libs.ops as libops
import pandas.compat as compat
from pandas.compat import wraps, zip
from pandas.util._decorators import Appender, deprecate_kwarg

from pandas.core.dtypes.common import (
Expand Down Expand Up @@ -3299,11 +3299,11 @@ def rindex(self, sub, start=0, end=None):
name='istitle',
docstring=_shared_docs['ismethods'] %
_shared_docs['istitle'])
isnumeric = _noarg_wrapper(lambda x: compat.u_safe(x).isnumeric(),
isnumeric = _noarg_wrapper(lambda x: x.isnumeric(),
name='isnumeric',
docstring=_shared_docs['ismethods'] %
_shared_docs['isnumeric'])
isdecimal = _noarg_wrapper(lambda x: compat.u_safe(x).isdecimal(),
isdecimal = _noarg_wrapper(lambda x: x.isdecimal(),
name='isdecimal',
docstring=_shared_docs['ismethods'] %
_shared_docs['isdecimal'])
Expand Down
12 changes: 3 additions & 9 deletions pandas/tests/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3159,15 +3159,9 @@ def test_str_accessor_no_new_attributes(self):
def test_method_on_bytes(self):
lhs = Series(np.array(list('abc'), 'S1').astype(object))
rhs = Series(np.array(list('def'), 'S1').astype(object))
if compat.PY3:
with pytest.raises(TypeError,
match="Cannot use .str.cat with values of.*"):
lhs.str.cat(rhs)
else:
result = lhs.str.cat(rhs)
expected = Series(np.array(
['ad', 'be', 'cf'], 'S2').astype(object))
tm.assert_series_equal(result, expected)
with pytest.raises(TypeError,
match="Cannot use .str.cat with values of.*"):
lhs.str.cat(rhs)

def test_casefold(self):
# GH25405
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0