添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
  • pandas.Timestamp.is_leap_year
  • pandas.Timestamp.is_month_end
  • pandas.Timestamp.is_month_start
  • pandas.Timestamp.is_quarter_end
  • pandas.Timestamp.is_quarter_start
  • pandas.Timestamp.is_year_end
  • pandas.Timestamp.is_year_start
  • pandas.Timestamp.max
  • pandas.Timestamp.microsecond
  • pandas.Timestamp.min
  • pandas.Timestamp.minute
  • pandas.Timestamp.month
  • pandas.Timestamp.nanosecond
  • pandas.Timestamp.quarter
  • pandas.Timestamp.resolution
  • pandas.Timestamp.second
  • pandas.Timestamp.tz
  • pandas.Timestamp.tzinfo
  • pandas.Timestamp.unit
  • pandas.Timestamp.value
  • pandas.Timestamp.week
  • pandas.Timestamp.weekofyear
  • pandas.Timestamp.year
  • pandas.Timestamp.as_unit
  • pandas.Timestamp.astimezone
  • pandas.Timestamp.ceil
  • pandas.Timestamp.combine
  • pandas.Timestamp.ctime
  • pandas.Timestamp.date
  • pandas.Timestamp.day_name
  • pandas.Timestamp.dst
  • pandas.Timestamp.floor
  • pandas.Timestamp.fromordinal
  • pandas.Timestamp.fromtimestamp
  • pandas.Timestamp.isocalendar
  • pandas.Timestamp.isoformat
  • pandas.Timestamp.isoweekday
  • pandas.Timestamp.month_name
  • pandas.Timestamp.normalize
  • pandas.Timestamp.now
  • pandas.Timestamp.replace
  • pandas.Timestamp.round
  • pandas.Timestamp.strftime
  • pandas.Timestamp.strptime
  • pandas.Timestamp.time
  • pandas.Timestamp.timestamp
  • pandas.Timestamp.timetuple
  • pandas.Timestamp.timetz
  • pandas.Timestamp.to_datetime64
  • pandas.Timestamp.to_numpy
  • pandas.Timestamp.to_julian_date
  • pandas.Timestamp.to_period
  • pandas.Timestamp.to_pydatetime
  • pandas.Timestamp.today
  • pandas.Timestamp.toordinal
  • pandas.Timestamp.tz_convert
  • pandas.Timestamp.tz_localize
  • pandas.Timestamp.tzname
  • pandas.Timestamp.utcfromtimestamp
  • pandas.Timestamp.utcnow
  • pandas.Timestamp.utcoffset
  • pandas.Timestamp.utctimetuple
  • pandas.Timestamp.weekday
  • pandas.arrays.DatetimeArray
  • pandas.DatetimeTZDtype
  • pandas.Timedelta
  • pandas.Timedelta.asm8
  • pandas.Timedelta.components
  • pandas.Timedelta.days
  • pandas.Timedelta.max
  • pandas.Timedelta.microseconds
  • pandas.Timedelta.min
  • pandas.Timedelta.nanoseconds
  • pandas.Timedelta.resolution
  • pandas.Timedelta.seconds
  • pandas.Timedelta.unit
  • pandas.Timedelta.value
  • pandas.Timedelta.view
  • pandas.Timedelta.as_unit
  • pandas.Timedelta.ceil
  • pandas.Timedelta.floor
  • pandas.Timedelta.isoformat
  • pandas.Timedelta.round
  • pandas.Timedelta.to_pytimedelta
  • pandas.Timedelta.to_timedelta64
  • pandas.Timedelta.to_numpy
  • pandas.Timedelta.total_seconds
  • pandas.arrays.TimedeltaArray
  • pandas.Period
  • pandas.Period.day
  • pandas.Period.dayofweek
  • pandas.Period.day_of_week
  • pandas.Period.dayofyear
  • pandas.Period.day_of_year
  • pandas.Period.days_in_month
  • pandas.Period.daysinmonth
  • pandas.Period.end_time
  • pandas.Period.freq
  • pandas.Period.freqstr
  • pandas.Period.hour
  • pandas.Period.is_leap_year
  • pandas.Period.minute
  • pandas.Period.month
  • pandas.Period.ordinal
  • pandas.Period.quarter
  • pandas.Period.qyear
  • pandas.Period.second
  • pandas.Period.start_time
  • pandas.Period.week
  • pandas.Period.weekday
  • pandas.Period.weekofyear
  • pandas.Period.year
  • pandas.Period.asfreq
  • pandas.Period.now
  • pandas.Period.strftime
  • pandas.Period.to_timestamp
  • pandas.arrays.PeriodArray
  • pandas.PeriodDtype
  • pandas.Interval
  • pandas.Interval.closed
  • pandas.Interval.closed_left
  • pandas.Interval.closed_right
  • pandas.Interval.is_empty
  • pandas.Interval.left
  • pandas.Interval.length
  • pandas.Interval.mid
  • pandas.Interval.open_left
  • pandas.Interval.open_right
  • pandas.Interval.overlaps
  • pandas.Interval.right
  • pandas.arrays.IntervalArray
  • pandas.IntervalDtype
  • pandas.arrays.IntegerArray
  • pandas.Int8Dtype
  • pandas.Int16Dtype
  • pandas.Int32Dtype
  • pandas.Int64Dtype
  • pandas.UInt8Dtype
  • pandas.UInt16Dtype
  • pandas.UInt32Dtype
  • pandas.UInt64Dtype
  • pandas.arrays.FloatingArray
  • pandas.Float32Dtype
  • pandas.Float64Dtype
  • pandas.CategoricalDtype
  • pandas.CategoricalDtype.categories
  • pandas.CategoricalDtype.ordered
  • pandas.Categorical
  • pandas.Categorical.from_codes
  • pandas.Categorical.dtype
  • pandas.Categorical.categories
  • pandas.Categorical.ordered
  • pandas.Categorical.codes
  • pandas.Categorical.__array__
  • pandas.arrays.SparseArray
  • pandas.SparseDtype
  • pandas.arrays.StringArray
  • pandas.arrays.ArrowStringArray
  • pandas.StringDtype
  • pandas.arrays.BooleanArray
  • pandas.BooleanDtype
  • pandas.api.types.union_categoricals
  • pandas.api.types.infer_dtype
  • pandas.api.types.pandas_dtype
  • pandas.api.types.is_any_real_numeric_dtype
  • pandas.api.types.is_bool_dtype
  • pandas.api.types.is_categorical_dtype
  • pandas.api.types.is_complex_dtype
  • pandas.api.types.is_datetime64_any_dtype
  • pandas.api.types.is_datetime64_dtype
  • pandas.api.types.is_datetime64_ns_dtype
  • pandas.api.types.is_datetime64tz_dtype
  • pandas.api.types.is_extension_array_dtype
  • pandas.api.types.is_float_dtype
  • pandas.api.types.is_int64_dtype
  • pandas.api.types.is_integer_dtype
  • pandas.api.types.is_interval_dtype
  • pandas.api.types.is_numeric_dtype
  • pandas.api.types.is_object_dtype
  • pandas.api.types.is_period_dtype
  • pandas.api.types.is_signed_integer_dtype
  • pandas.api.types.is_string_dtype
  • pandas.api.types.is_timedelta64_dtype
  • pandas.api.types.is_timedelta64_ns_dtype
  • pandas.api.types.is_unsigned_integer_dtype
  • pandas.api.types.is_sparse
  • pandas.api.types.is_dict_like
  • pandas.api.types.is_file_like
  • pandas.api.types.is_list_like
  • pandas.api.types.is_named_tuple
  • pandas.api.types.is_iterator
  • pandas.api.types.is_bool
  • pandas.api.types.is_complex
  • pandas.api.types.is_float
  • pandas.api.types.is_hashable
  • pandas.api.types.is_integer
  • pandas.api.types.is_interval
  • pandas.api.types.is_number
  • pandas.api.types.is_re
  • pandas.api.types.is_re_compilable
  • pandas.api.types.is_scalar
  • Index objects
  • Date offsets
  • Window
  • GroupBy
  • Resampling
  • Style
  • Plotting
  • Options and settings
  • Extensions
  • Testing
  • Missing values
  • class pandas. Timestamp ( ts_input=<object object> , year=None , month=None , day=None , hour=None , minute=None , second=None , microsecond=None , tzinfo=None , * , nanosecond=None , tz=None , unit=None , fold=None ) #

    Pandas replacement for python datetime.datetime object.

    Timestamp is the pandas equivalent of python’s Datetime and is interchangeable with it in most cases. It’s the type used for the entries that make up a DatetimeIndex, and other timeseries oriented data structures in pandas.

    Parameters :
    ts_input datetime-like, str, int, float

    Value to be converted to Timestamp.

    year, month, day int
    hour, minute, second, microsecond int, optional, default 0
    tzinfo datetime.tzinfo, optional, default None
    nanosecond int, optional, default 0
    tz str, pytz.timezone, dateutil.tz.tzfile or None

    Time zone for time which Timestamp will have.

    unit str

    Unit used for conversion if ts_input is of type int or float. The valid values are ‘D’, ‘h’, ‘m’, ‘s’, ‘ms’, ‘us’, and ‘ns’. For example, ‘s’ means seconds and ‘ms’ means milliseconds.

    For float inputs, the result will be stored in nanoseconds, and the unit attribute will be set as 'ns' .

    fold {0, 1}, default None, keyword-only

    Due to daylight saving time, one wall clock time can occur twice when shifting from summer to winter time; fold describes whether the datetime-like corresponds to the first (0) or the second time (1) the wall clock hits the ambiguous time.

    Notes

    There are essentially three calling conventions for the constructor. The primary form accepts four parameters. They can be passed by position or keyword.

    The other two forms mimic the parameters from datetime.datetime . They can be passed by either position or keyword, but not both mixed together.

    Examples

    Using the primary calling convention:

    This converts a datetime-like string

    >>> pd.Timestamp('2017-01-01T12')
    Timestamp('2017-01-01 12:00:00')
    

    This converts a float representing a Unix epoch in units of seconds

    >>> pd.Timestamp(1513393355.5, unit='s')
    Timestamp('2017-12-16 03:02:35.500000')
    

    This converts an int representing a Unix-epoch in units of seconds and for a particular timezone

    >>> pd.Timestamp(1513393355, unit='s', tz='US/Pacific')
    Timestamp('2017-12-15 19:02:35-0800', tz='US/Pacific')
    

    Using the other two forms that mimic the API for datetime.datetime:

    >>> pd.Timestamp(2017, 1, 1, 12)
    Timestamp('2017-01-01 12:00:00')
    
    >>> pd.Timestamp(year=2017, month=1, day=1, hour=12)
    Timestamp('2017-01-01 12:00:00')
    

    Attributes

    Return numpy datetime64 format in nanoseconds.

    day_of_week

    Return day of the week.

    day_of_year

    Return the day of the year.

    dayofweek

    Return day of the week.

    dayofyear

    Return the day of the year.

    days_in_month

    Return the number of days in the month.

    daysinmonth

    Return the number of days in the month.

    is_leap_year

    Return True if year is a leap year.

    is_month_end

    Check if the date is the last day of the month.

    is_month_start

    Check if the date is the first day of the month.

    is_quarter_end

    Check if date is last day of the quarter.

    is_quarter_start

    Check if the date is the first day of the quarter.

    is_year_end

    Return True if date is last day of the year.

    is_year_start

    Return True if date is first day of the year.

    microsecond

    minute

    month

    nanosecond

    quarter

    Return the quarter of the year.

    resolution

    second

    Alias for tzinfo.

    tzinfo

    The abbreviation associated with self._creso.

    value

    Return the week number of the year.

    weekofyear

    Return the week number of the year.

    Convert timezone-aware Timestamp to another time zone.

    ceil(freq[, ambiguous, nonexistent])

    Return a new Timestamp ceiled to this resolution.

    combine(date, time)

    Combine date, time into datetime with same date and time fields.

    ctime()

    Return ctime() style string.

    date()

    Return date object with same year, month and day.

    day_name([locale])

    Return the day name of the Timestamp with specified locale.

    dst()

    Return the daylight saving time (DST) adjustment.

    floor(freq[, ambiguous, nonexistent])

    Return a new Timestamp floored to this resolution.

    fromisocalendar

    int, int, int -> Construct a date from the ISO year, week number and weekday.

    fromisoformat

    string -> datetime from datetime.isoformat() output

    fromordinal(ordinal[, tz])

    Construct a timestamp from a a proleptic Gregorian ordinal.

    fromtimestamp(ts)

    Transform timestamp[, tz] to tz's local time from POSIX timestamp.

    isocalendar()

    Return a named tuple containing ISO year, week number, and weekday.

    isoformat([sep, timespec])

    Return the time formatted according to ISO 8601.

    isoweekday()

    Return the day of the week represented by the date.

    month_name([locale])

    Return the month name of the Timestamp with specified locale.

    normalize()

    Normalize Timestamp to midnight, preserving tz information.

    now([tz])

    Return new Timestamp object representing current time local to tz.

    replace([year, month, day, hour, minute, ...])

    Implements datetime.replace, handles nanoseconds.

    round(freq[, ambiguous, nonexistent])

    Round the Timestamp to the specified resolution.

    strftime(format)

    Return a formatted string of the Timestamp.

    strptime(string, format)

    Function is not implemented.

    time()

    Return time object with same time but with tzinfo=None.

    timestamp()

    Return POSIX timestamp as float.

    timetuple()

    Return time tuple, compatible with time.localtime().

    timetz()

    Return time object with same time and tzinfo.

    to_datetime64()

    Return a numpy.datetime64 object with same precision.

    to_julian_date()

    Convert TimeStamp to a Julian Date.

    to_numpy([dtype, copy])

    Convert the Timestamp to a NumPy datetime64.

    to_period([freq])

    Return an period of which this timestamp is an observation.

    to_pydatetime([warn])

    Convert a Timestamp object to a native Python datetime object.

    today([tz])

    Return the current time in the local timezone.

    toordinal()

    Return proleptic Gregorian ordinal.

    tz_convert(tz)

    Convert timezone-aware Timestamp to another time zone.

    tz_localize(tz[, ambiguous, nonexistent])

    Localize the Timestamp to a timezone.

    tzname()

    Return time zone name.

    utcfromtimestamp(ts)

    Construct a timezone-aware UTC datetime from a POSIX timestamp.

    utcnow()

    Return a new Timestamp representing UTC day and time.

    utcoffset()

    Return utc offset.

    utctimetuple()

    Return UTC time tuple, compatible with time.localtime().

    weekday()

    Return the day of the week represented by the date.