altair.TimeUnitTransformParams#

class altair.TimeUnitTransformParams(maxbins=Undefined, step=Undefined, unit=Undefined, utc=Undefined, **kwds)#

TimeUnitTransformParams 模式封装器。

参数:
maxbinsfloat

如果未指定unit,则使用 maxbins 来推断时间单位。

stepfloat

以提供的最不重要的单位计算, bin 之间的步长。

unitTimeUnit, MultiTimeUnit, SingleTimeUnit, UtcMultiTimeUnit, UtcSingleTimeUnit, LocalMultiTimeUnit, LocalSingleTimeUnit, Literal[‘utcyear’, ‘utcquarter’, ‘utcmonth’, ‘utcweek’, ‘utcday’, ‘utcdayofyear’, ‘utcdate’, ‘utchours’, ‘utcminutes’, ‘utcseconds’, ‘utcmilliseconds’, ‘year’, ‘quarter’, ‘month’, ‘week’, ‘day’, ‘dayofyear’, ‘date’, ‘hours’, ‘minutes’, ‘seconds’, ‘milliseconds’, ‘utcyearquarter’, ‘utcyearquartermonth’, ‘utcyearmonth’, ‘utcyearmonthdate’, ‘utcyearmonthdatehours’, ‘utcyearmonthdatehoursminutes’, ‘utcyearmonthdatehoursminutesseconds’, ‘utcyearweek’, ‘utcyearweekday’, ‘utcyearweekdayhours’, ‘utcyearweekdayhoursminutes’, ‘utcyearweekdayhoursminutesseconds’, ‘utcyeardayofyear’, ‘utcquartermonth’, ‘utcmonthdate’, ‘utcmonthdatehours’, ‘utcmonthdatehoursminutes’, ‘utcmonthdatehoursminutesseconds’, ‘utcweekday’, ‘utcweekdayhours’, ‘utcweekdayhoursminutes’, ‘utcweekdayhoursminutesseconds’, ‘utcdayhours’, ‘utcdayhoursminutes’, ‘utcdayhoursminutesseconds’, ‘utchoursminutes’, ‘utchoursminutesseconds’, ‘utcminutesseconds’, ‘utcsecondsmilliseconds’, ‘yearquarter’, ‘yearquartermonth’, ‘yearmonth’, ‘yearmonthdate’, ‘yearmonthdatehours’, ‘yearmonthdatehoursminutes’, ‘yearmonthdatehoursminutesseconds’, ‘yearweek’, ‘yearweekday’, ‘yearweekdayhours’, ‘yearweekdayhoursminutes’, ‘yearweekdayhoursminutesseconds’, ‘yeardayofyear’, ‘quartermonth’, ‘monthdate’, ‘monthdatehours’, ‘monthdatehoursminutes’, ‘monthdatehoursminutesseconds’, ‘weekday’, ‘weekdayhours’, ‘weekdayhoursminutes’, ‘weekdayhoursminutesseconds’, ‘dayhours’, ‘dayhoursminutes’, ‘dayhoursminutesseconds’, ‘hoursminutes’, ‘hoursminutesseconds’, ‘minutesseconds’, ‘secondsmilliseconds’]

定义日期时间值应如何分箱。

utcbool

设为 True 使用 UTC 时区。相当于使用带有utc前缀的TimeUnit

__init__(maxbins=Undefined, step=Undefined, unit=Undefined, utc=Undefined, **kwds)#

方法

__init__([maxbins, step, unit, utc])

copy([deep, ignore])

返回对象的副本。

from_dict(dct[, validate])

从字典表示构造类。

from_json(json_string[, validate])

从有效的 JSON 字符串实例化对象。

resolve_references([schema])

在此对象的模式或根模式上下文中解析引用。

to_dict([validate, ignore, context])

返回对象的字典表示。

to_json([validate, indent, sort_keys, ...])

将此对象的 JSON 表示输出为字符串。

validate(instance[, schema])

在根模式的上下文中根据类模式验证实例。

validate_property(name, value[, schema])

在根模式的上下文中根据属性模式验证属性。