class altair.BinTransform(bin=Undefined, field=Undefined, **kwds)#

BinTransform schema 包装器。

参数:

bindict, Literal[True], BinParams
一个指示 bin 属性的对象,或者简单地使用 true 来使用默认 bin 参数。

fieldstr, FieldName

要进行分箱的数据字段。

asstr, FieldName, Sequence[str, FieldName]

用于写入分箱开始和结束值的输出字段。这可以是一个字符串,或者一个包含两个元素的字符串数组,分别表示分箱开始和分箱结束字段的名称。如果提供单个字符串(例如,"val"),则结束字段将为 "val_end"

__init__(bin=Undefined, field=Undefined, **kwds)#

__init__(bin=Undefined, field=Undefined, **kwds)#

方法

__init__([bin, field])

copy([deep, ignore])

返回对象的副本。

from_dict(dct[, validate])

从字典表示构造类。

from_json(json_string[, validate])

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

resolve_references([schema])

在对象 schema 或根 schema 的上下文中解析引用。

to_dict([validate, ignore, context])

返回对象的字典表示。

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

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

validate(instance[, schema])

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

validate_property(name, value[, schema])

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