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

cannot write resampled frame to excel TypeError: 'Period' object does not support indexing #2240

Closed
simonm3 opened this issue Nov 13, 2012 · 1 comment
Labels
Bug Datetime Datetime data dtype IO Data IO issues that don't fit into a more specific label
Milestone

Comments

@simonm3
Copy link

simonm3 commented Nov 13, 2012

Excel_to function is not working with some dataframes with period index

this works for a dataframe with timeseries index

close.to_excel("temp.xlsx")

this does not work. fails with error shown above

monthly=close.resample('M', kind='period')
monthly.to_excel("temp.xlsx")

@changhiskhan
Copy link
Contributor

That's because xlwt and openpyxl do not know how to handle Period objects from pandas. We'll put in a fix. Thanks for the bug report.

@ghost ghost assigned changhiskhan Nov 14, 2012
@wesm wesm closed this as completed Nov 14, 2012
yarikoptic added a commit to neurodebian/pandas that referenced this issue Nov 15, 2012
Version 0.9.1

* tag 'v0.9.1':
  RLS: Version 0.9.1 final
  BUG: icol() should propegate fill_value for sparse data frames pandas-dev#2249
  TST: icol() should propegate fill_value for sparse data frames
  BUG: override SparseDataFrame.icol to use __getitem__ instead of accessing _data internals. close pandas-dev#2251
  BUG: make Series.tz_localize work with length-0 non-DatetimeIndex. close pandas-dev#2248
  BUG: parallel_coordinates bugfix with matplotlib 1.2.0. close pandas-dev#2237
  BUG: issue constructing DataFrame from empty Series with name. close pandas-dev#2234
  ENH: disable repr dependence on terminal width when running non-interactively. pandas-dev#1610
  BUG: ExcelWriter raises exception on PeriodIndex pandas-dev#2240
  BUG: SparseDataFrame.icol return SparseSeries. SparseSeries.from_array return SparseSeries. close pandas-dev#2227, pandas-dev#2229
  BUG: fix tz-aware resampling issue. close pandas-dev#2245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

No branches or pull requests

3 participants