Skip to content

BUG: DataFrame creation from a tz-aware Index #19198

@jbrockmendel

Description

@jbrockmendel
dti = pd.date_range('2016-09-23', periods=3, tz='US/Central') df = pd.DataFrame(dti) >>> df.T Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pandas/core/frame.py", line 1941, in transpose return super(DataFrame, self).transpose(1, 0, **kwargs) File "pandas/core/generic.py", line 616, in transpose new_values = self.values.transpose(axes_numbers) File "pandas/core/base.py", line 697, in transpose nv.validate_transpose(args, kwargs) File "pandas/compat/numpy/function.py", line 54, in __call__ self.defaults) File "pandas/util/_validators.py", line 218, in validate_args_and_kwargs validate_kwargs(fname, kwargs, compat_args) File "pandas/util/_validators.py", line 157, in validate_kwargs _check_for_default_values(fname, kwds, compat_args) File "pandas/util/_validators.py", line 69, in _check_for_default_values format(fname=fname, arg=key))) ValueError: the 'axes' parameter is not supported in the pandas implementation of transpose() 

Looks like this is b/c df.values is a DatetimeIndex

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtypeDuplicate ReportDuplicate issue or pull requestReshapingConcat, Merge/Join, Stack/Unstack, Explode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions