8000 ENH: Add Series.str.casefold by charlesdong1991 · Pull Request #25419 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

ENH: Add Series.str.casefold #25419

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 17 commits into from
Feb 28, 2019
Merged
Changes from 1 commit
Commits
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
add skipif to avoid failure
  • Loading branch information
charlesdong1991 committed Feb 23, 2019
commit d1470754d9e5fce7f60941fb1b79ce1bafcc8c60
5 changes: 3 additions & 2 deletions pandas/tests/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3425,9 +3425,10 @@ def test_method_on_bytes(self):
['ad', 'be', 'cf'], 'S2').astype(object))
tm.assert_series_equal(result, expected)

@pytest.mark.skipif(compat.PY2, reason='not in python2')
def test_casefold(self):
casefolded = Series(['ss', 'case', 'ssd'])
s = Series(['ß', 'case', 'ßd'])
casefolded = Series(['ss', NA, 'case', 'ssd'])
Copy link
Member

Choose a reason for hiding this comment

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

Just call this expected

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, @WillAyd i just changed!

s = Series(['ß', NA, 'case', 'ßd'])
result = s.str.casefold()

tm.assert_series_equal(result, casefolded)
0