@@ -369,7 +369,7 @@ cdef class _Timestamp(datetime):
369369class Timestamp (_Timestamp ):
370370 """ Pandas replacement for datetime.datetime
371371
372- TimeStamp is the pandas equivalent of python's Datetime
372+ Timestamp is the pandas equivalent of python's Datetime
373373 and is interchangable with it in most cases. It's the type used
374374 for the entries that make up a DatetimeIndex, and other timeseries
375375 oriented data structures in pandas.
@@ -380,10 +380,11 @@ class Timestamp(_Timestamp):
380380 Value to be converted to Timestamp
381381 freq : str, DateOffset
382382 Offset which Timestamp will have
383- tz : string , pytz.timezone, dateutil.tz.tzfile or None
383+ tz : str , pytz.timezone, dateutil.tz.tzfile or None
384384 Time zone for time which Timestamp will have.
385- unit : string
386- numpy unit used for conversion, if ts_input is int or float
385+ unit : str
386+ Unit used for conversion if ts_input is of type int or float.
387+ For example, 's' means seconds and 'ms' means milliseconds.
387388 offset : str, DateOffset
388389 Deprecated, use freq
389390
@@ -405,9 +406,19 @@ class Timestamp(_Timestamp):
405406
406407 Examples
407408 --------
409+ Using the primary calling convention:
410+
408411 >>> pd.Timestamp('2017-01-01T12')
409412 Timestamp('2017-01-01 12:00:00')
410413
414+ >>> pd.Timestamp(1513393355.5, unit='s')
415+ Timestamp('2017-12-16 03:02:35.500000')
416+
417+ >>> pd.Timestamp(1513393355, unit='s', tz='US/Pacific')
418+ Timestamp('2017-12-15 19:02:35-0800', tz='US/Pacific')
419+
420+ Using the other two forms that minic the API for ``datetime.datetime``:
421+
411422 >>> pd.Timestamp(2017, 1, 1, 12)
412423 Timestamp('2017-01-01 12:00:00')
413424
@@ -429,7 +440,7 @@ class Timestamp(_Timestamp):
429440 date corresponding to a proleptic Gregorian ordinal
430441 freq : str, DateOffset
431442 Offset which Timestamp will have
432- tz : string , pytz.timezone, dateutil.tz.tzfile or None
443+ tz : str , pytz.timezone, dateutil.tz.tzfile or None
433444 Time zone for time which Timestamp will have.
434445 offset : str, DateOffset
435446 Deprecated, use freq
@@ -447,7 +458,7 @@ class Timestamp(_Timestamp):
447458
448459 Parameters
449460 ----------
450- tz : string / timezone object, default None
461+ tz : str or timezone object, default None
451462 Timezone to localize to
452463 """
453464 if is_string_object(tz):
@@ -465,7 +476,7 @@ class Timestamp(_Timestamp):
465476
466477 Parameters
467478 ----------
468- tz : string / timezone object, default None
479+ tz : str or timezone object, default None
469480 Timezone to localize to
470481 """
471482 return cls .now(tz)
@@ -774,7 +785,7 @@ class Timestamp(_Timestamp):
774785
775786 Parameters
776787 ----------
777- tz : string , pytz.timezone, dateutil.tz.tzfile or None
788+ tz : str , pytz.timezone, dateutil.tz.tzfile or None
778789 Time zone for time which Timestamp will be converted to.
779790 None will remove timezone holding local time.
780791
@@ -828,7 +839,7 @@ class Timestamp(_Timestamp):
828839
829840 Parameters
830841 ----------
831- tz : string , pytz.timezone, dateutil.tz.tzfile or None
842+ tz : str , pytz.timezone, dateutil.tz.tzfile or None
832843 Time zone for time which Timestamp will be converted to.
833844 None will remove timezone holding UTC time.
834845
0 commit comments