def __init__(self, obj, orient, date_format, double_precision,<EOL>ensure_ascii, date_unit, index, default_handler=None):
super().__init__(obj, orient, date_format, double_precision,<EOL>ensure_ascii, date_unit, index,<EOL>default_handler=default_handler)<EOL>if date_format != '<STR_LIT>':<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>.format(fmt=date_format))<EOL>raise ValueError(msg)<EOL><DEDENT>self.schema = build_table_schema(obj, index=self.index)<EOL>if obj.ndim == <NUM_LIT:2> and isinstance(obj.columns, MultiIndex):<EOL><INDENT>raise NotImplementedError(<EOL>"<STR_LIT>")<EOL><DEDENT>if ((obj.ndim == <NUM_LIT:1>) and (obj.name in set(obj.index.names)) or<EOL>len(obj.columns & obj.index.names)):<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise ValueError(msg)<EOL><DEDENT>obj = obj.copy()<EOL>timedeltas = obj.select_dtypes(include=['<STR_LIT>']).columns<EOL>if len(timedeltas):<EOL><INDENT>obj[timedeltas] = obj[timedeltas].applymap(<EOL>lambda x: x.isoformat())<EOL><DEDENT>if is_period_dtype(obj.index):<EOL><INDENT>obj.index = obj.index.to_timestamp()<EOL><DEDENT>if not self.index:<EOL><INDENT>self.obj = obj.reset_index(drop=True)<EOL><DEDENT>else:<EOL><INDENT>self.obj = obj.reset_index(drop=False)<EOL><DEDENT>self.date_format = '<STR_LIT>'<EOL>self.orient = '<STR_LIT>'<EOL>self.index = index<EOL>
Adds a `schema` attribute with the Table Schema, resets
the index (can't do in caller, because the schema inference needs
to know what the index is, forces orient to records, and forces
date_format to 'iso'.