This website is for version 5. You can find the documentation for version 4 here.

altair.CsvDataFormat#

class altair.CsvDataFormat(parse=Undefined, type=Undefined, **kwds)#

CsvDataFormat schema wrapper

Parameters:
parsedict, None, Parse

If set to null, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of "number", "boolean", "date", or null (do not parse the field)). For example, "parse": {"modified_on": "date"} parses the modified_on field in each input record a Date value.

For "date", we parse data based using JavaScript’s Date.parse(). For Specific date formats can be provided (e.g., {foo: "date:'%m%d%Y'"} ), using the d3-time-format syntax. UTC date format parsing is supported similarly (e.g., {foo: "utc:'%m%d%Y'"} ). See more about UTC time

typeLiteral[‘csv’, ‘tsv’]

Type of input data: "json", "csv", "tsv", "dsv".

Default value: The default format type is determined by the extension of the file URL. If no extension is detected, "json" will be used by default.

__init__(parse=Undefined, type=Undefined, **kwds)#

Methods

__init__([parse, type])

copy([deep, ignore])

Return a copy of the object

from_dict(dct[, validate, _wrapper_classes])

Construct class from a dictionary representation

from_json(json_string[, validate])

Instantiate the object from a valid JSON string

resolve_references([schema])

Resolve references in the context of this object's schema or root schema.

to_dict([validate, ignore, context])

Return a dictionary representation of the object

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

Emit the JSON representation for this object as a string.

validate(instance[, schema])

Validate the instance against the class schema in the context of the rootschema.

validate_property(name, value[, schema])

Validate a property against property schema in the context of the rootschema