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

Allow 3D references as argument to xl method #37

Open
ncalm opened this issue Sep 26, 2023 · 1 comment
Open

Allow 3D references as argument to xl method #37

ncalm opened this issue Sep 26, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ncalm
Copy link

ncalm commented Sep 26, 2023

It would be incredibly useful to be able to pass 3D references into the xl method.

Suppose you have some data in B2:K11 on each of sheets 1, 2 and 3.

We might have a 3D reference:

Sheet1:Sheet3!B2:K11

The xl method currently doesn't allow this type of reference.

It would be useful to be able to create one of the following from such a reference:

  • 3D np.ndarray
  • list of dataframes (one per sheet)
  • dictionary of dataframes (one per sheet)
  • sheets concatenated into a single pd.DataFrame (with a metadata column for sheet_name added by the function)

I'm sure all of this is possible by passing a callback to excel.set_xl_array_conversion, but the issue is that the xl method doesn't recognize 3D arrays at all, so it's not possible.

@keyur32 keyur32 added the enhancement New feature or request label Oct 4, 2023
@keyur32
Copy link
Collaborator

keyur32 commented Oct 4, 2023

Thanks for this @ncalm! Yes, we currently do not support this behavior so would be interested, so don't have an ETA.

There are some not-great workarounds, for example putting your references into data frames (or whatever object you have overridden in your conversion functions). And then combining them in a subsequent python cell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants