8000 DOC: Improved the docstring of Series.str.findall by jcontesti · Pull Request #2 · python-sprints/pandas · GitHub
[go: up one dir, main page]

Skip to content

DOC: Improved the docstring of Series.str.findall #2

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

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
96b8bb1
ENH: Implement DataFrame.astype('category') (#18099)
jschendel Mar 1, 2018
4a27697
Cythonized GroupBy any (#19722)
WillAyd Mar 1, 2018
52559f5
ENH: Allow Timestamp to accept Nanosecond argument (#19889)
mroeschke Mar 1, 2018
c8859b5
DOC: script to build single docstring page (#19840)
jorisvandenbossche Mar 1, 2018
3b4eb8d
CLN: remove redundant clean_fill_method calls (#19947)
jorisvandenbossche Mar 1, 2018
9958ce6
BUG: Preserve column metadata with DataFrame.astype (#19948)
jschendel Mar 1, 2018
c5a1ef1
DOC: remove empty attribute/method lists from class docstrings html p…
jorisvandenbossche Mar 1, 2018
9242248
BUG: DataFrame.diff(axis=0) with DatetimeTZ data (#19773)
mroeschke Mar 1, 2018
87fefe2
dispatch Series[datetime64] comparison ops to DatetimeIndex (#19800)
jbrockmendel Mar 1, 2018
d44a6ec
Making to_datetime('today') and Timestamp('today') consistent (#19937)
shangyian Mar 1, 2018
072545d
ENH: Add option to disable MathJax (#19824). (#19856)
davidchall Mar 1, 2018
5f271eb
BUG: Adding skipna as an option to groupby cumsum and cumprod (#19914)
shangyian Mar 1, 2018
d615f86
DOC: Adding script to validate docstrings, and generate list of all f…
datapythonista Mar 2, 2018
e6c7dea
ENH: Let initialisation from dicts use insertion order for python >= …
topper-123 Mar 2, 2018
b167483
DOC: update install.rst to include ActivePython distribution (#19908)
Dr-G Mar 2, 2018
a7a7f8c
DOC: clarify version of ActivePython that includes pandas (#19964)
jorisvandenbossche Mar 2, 2018
fe09b66
First try of my docstring
jcontesti Mar 2, 2018
a227404
DOC: Improved the docstring of Series.str.findall
jcontesti Mar 2, 2018
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
Making to_datetime('today') and Timestamp('today') consistent (pandas…
  • Loading branch information
shangyian authored and jreback committed Mar 1, 2018
commit d44a6ec2a9f6f28b968951d941e38539435c6bec
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.23.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ Other API Changes
- Set operations (union, difference...) on :class:`IntervalIndex` with incompatible index types will now raise a ``TypeError`` rather than a ``ValueError`` (:issue:`19329`)
- :class:`DateOffset` objects render more simply, e.g. ``<DateOffset: days=1>`` instead of ``<DateOffset: kwds={'days': 1}>`` (:issue:`19403`)
- ``Categorical.fillna`` now validates its ``value`` and ``method`` keyword arguments. It now raises when both or none are specified, matching the behavior of :meth:`Series.fillna` (:issue:`19682`)
- ``pd.to_datetime('today')`` now returns a datetime, consistent with ``pd.Timestamp('today')``; previously ``pd.to_datetime('today')`` returned a ``.normalized()`` datetime (:issue:`19935`)
- :func:`Series.str.replace` now takes an optional `regex` keyword which, when set to ``False``, uses literal string replacement rather than regex replacement (:issue:`16808`)

.. _whatsnew_0230.deprecations:
Expand Down
3 changes: 1 addition & 2 deletions pandas/_libs/tslib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,7 @@ cdef inline bint _parse_today_now(str val, int64_t* iresult):
iresult[0] = Timestamp.utcnow().value
return True
elif val == 'today':
# Note: this is *not* the same as Timestamp('today')
iresult[0] = Timestamp.now().normalize().value
iresult[0] = Timestamp.today().value
return True
return False

Expand Down
19 changes: 13 additions & 6 deletions pandas/tests/indexes/datetimes/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,27 +224,34 @@ def test_to_datetime_today(self):
# this both of these timezones _and_ UTC will all be in the same day,
# so this test will not detect the regression introduced in #18666.
with tm.set_timezone('Pacific/Auckland'): # 12-13 hours ahead of UTC
nptoday = np.datetime64('today').astype('datetime64[ns]')
nptoday = np.datetime64('today')\
.astype('datetime64[ns]').astype(np.int64)
pdtoday = pd.to_datetime('today')
pdtoday2 = pd.to_datetime(['today'])[0]

tstoday = pd.Timestamp('today')
tstoday2 = pd.Timestamp.today()

# These should all be equal with infinite perf; this gives
# a generous margin of 10 seconds
assert abs(pdtoday.value - nptoday.astype(np.int64)) < 1e10
assert abs(pdtoday2.value - nptoday.astype(np.int64)) < 1e10
assert abs(pdtoday.normalize().value - nptoday) < 1e10
assert abs(pdtoday2.normalize().value - nptoday) < 1e10
assert abs(pdtoday.value - tstoday.value) < 1e10
assert abs(pdtoday.value - tstoday2.value) < 1e10

assert pdtoday.tzinfo is None
assert pdtoday2.tzinfo is None

with tm.set_timezone('US/Samoa'): # 11 hours behind UTC
nptoday = np.datetime64('today').astype('datetime64[ns]')
nptoday = np.datetime64('today')\
.astype('datetime64[ns]').astype(np.int64)
pdtoday = pd.to_datetime('today')
pdtoday2 = pd.to_datetime(['today'])[0]

# These should all be equal with infinite perf; this gives
# a generous margin of 10 seconds
assert abs(pdtoday.value - nptoday.astype(np.int64)) < 1e10
assert abs(pdtoday2.value - nptoday.astype(np.int64)) < 1e10
assert abs(pdtoday.normalize().value - nptoday) < 1e10
assert abs(pdtoday2.normalize().value - nptoday) < 1e10

assert pdtoday.tzinfo is None
assert pdtoday2.tzinfo is None
Expand Down
0