Skip to content

Commit 529a051

Browse files
committed
CLN: Worked on Code Review.
1 parent 96c5bd8 commit 529a051

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pandas/tseries/tools.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,14 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False,
240240
speed by ~5-10x.
241241
origin : scalar convertible to Timestamp / string ('julian', 'epoch'),
242242
default 'epoch'.
243-
Define relative offset for the returned dates.
243+
Define reference date. The numeric values would be parsed as number
244+
of units (defined by `unit`) since this reference date.
244245
245-
- If 'epoch', offset is set to 1970-01-01.
246-
- If 'julian', unit must be 'D', and offset is set to beginning of
246+
- If 'epoch', origin is set to 1970-01-01.
247+
- If 'julian', unit must be 'D', and origin is set to beginning of
247248
Julian Calendar. Julian day number 0 is assigned to the day starting
248249
at noon on January 1, 4713 BC.
249-
- If Timestamp convertible, offset is set to Timestamp identified by
250+
- If Timestamp convertible, origin is set to Timestamp identified by
250251
origin.
251252
252253
.. versionadded: 0.19.0
@@ -454,7 +455,7 @@ def result_without_offset(arg):
454455
try:
455456
offset = tslib.Timestamp(origin) - tslib.Timestamp(0)
456457
except ValueError:
457-
raise ValueError("Invalid Origin or Origin Out of Bound")
458+
raise ValueError("Invalid 'origin' or 'origin' Out of Bound")
458459

459460
if offset is not None:
460461
result = result + offset

0 commit comments

Comments
 (0)