@@ -225,8 +225,12 @@ class Timestamp(_Timestamp):
225
225
for the entries that make up a DatetimeIndex, and other timeseries
226
226
oriented data structures in pandas.
227
227
228
- Parameters
229
- ----------
228
+ There are essentially three calling conventions for the constructor. The
229
+ first, legacy form accepts four parameters. They can be passed by
230
+ position or keyword.
231
+
232
+ Legacy Parameters
233
+ -----------------
230
234
ts_input : datetime-like, str, int, float
231
235
Value to be converted to Timestamp
232
236
offset : str, DateOffset
@@ -235,6 +239,20 @@ class Timestamp(_Timestamp):
235
239
Time zone for time which Timestamp will have.
236
240
unit : string
237
241
numpy unit used for conversion, if ts_input is int or float
242
+
243
+ The other two forms copy the parameters from datetime.datetime. They can
244
+ be passed by either position or keyword, but not both mixed together.
245
+
246
+ datetime.datetime Parameters
247
+ ------------------------------
248
+ year : int
249
+ month : int
250
+ day : int
251
+ hour : int [optional]
252
+ minute : int [optional]
253
+ second : int [optional]
254
+ microsecond : int [optional]
255
+ tzinfo : datetime.tzinfo [optional]
238
256
"""
239
257
240
258
@classmethod
@@ -319,7 +337,7 @@ class Timestamp(_Timestamp):
319
337
return Timestamp(datetime(year, month, day, hour or 0 ,
320
338
minute or 0 , second or 0 , microsecond or 0 , tzinfo),
321
339
tz = tzinfo)
322
- if is_integer_object(offset):
340
+ elif is_integer_object(offset):
323
341
# User passed positional arguments:
324
342
# Timestamp(year, month, day[, hour[, minute[, second[, microsecond[, tzinfo]]]]])
325
343
return Timestamp(datetime(ts_input, offset, tz, unit or 0 ,
0 commit comments