Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jbrockmendel opened this issue Jan 12, 2018 · 2 comments
Closed

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

jbrockmendel opened this issue Jan 12, 2018 · 2 comments
Labels
Datetime Datetime data dtype Duplicate Report Duplicate issue or pull request Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Comments

@jbrockmendel
Copy link
Member

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

@jreback
Copy link
Contributor

jreback commented Jan 12, 2018

xref to #13287

@jreback jreback changed the title df.T ValueError with Datetime64TZ DataFrame creation from a tz-aware Index Jan 12, 2018
@jreback jreback changed the title DataFrame creation from a tz-aware Index BUG: DataFrame creation from a tz-aware Index Jan 12, 2018
@jreback
Copy link
Contributor

jreback commented Jan 13, 2018

this is a duplicate and the same cause as #13287

@jreback jreback closed this as completed Jan 13, 2018
@jreback jreback added Datetime Datetime data dtype Reshaping Concat, Merge/Join, Stack/Unstack, Explode Duplicate Report Duplicate issue or pull request labels Jan 13, 2018
@jreback jreback added this to the No action milestone Jan 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Duplicate Report Duplicate issue or pull request Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

No branches or pull requests

2 participants