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

[Documentation]: Icephys tutorial output is confusing #1467

Closed
3 tasks done
rly opened this issue May 2, 2022 · 3 comments · Fixed by #1469
Closed
3 tasks done

[Documentation]: Icephys tutorial output is confusing #1467

rly opened this issue May 2, 2022 · 3 comments · Fixed by #1469
Assignees
Labels
category: enhancement improvements of code or code behavior priority: medium non-critical problem and/or affecting only a small set of NWB users topic: docs issues related to documentation

Comments

@rly
Copy link
Contributor

rly commented May 2, 2022

What would you like changed or added to the documentation and why?

In the icephys tutorial on readthedocs, the output of icephys_meta_df.iloc[[0, 1, 18, 19]].transpose() does not look right, but maybe I am misreading it.

https://pynwb.readthedocs.io/en/stable/tutorials/domain/plot_icephys_pandas.html#sphx-glr-tutorials-domain-plot-icephys-pandas-py

image

Do you have any interest in helping write or edit the documentation?

No.

Code of Conduct

@oruebel
Copy link
Contributor

oruebel commented May 2, 2022

Can you clarify what seems to be wrong with the table? As far as I can tell the table looks correct to me.

As mentioned in the comment, the table is shown transposed to fit within the readthedocs layout, and maybe it just looks a bit strange with the multi-index on the columns. The table without transposing it would look as follows:

Screen Shot 2022-05-02 at 3 07 42 PM

Or we can also resolve the MultiIndex by calling .reset_index on the table so that the MultiIndex becomes part of the table, which would render as follows:

Screen Shot 2022-05-02 at 3 12 07 PM

@rly
Copy link
Contributor Author

rly commented May 2, 2022

It definitely looks strange and unintuitive when transposed in the way that it is. Especially with the row shading.

Can we just show an image of the non-transposed table, kind of like what we see here on this GitHub issue, where the viewer can click the image to see it in full width? The table text does not need to be selectable. The downside is that if the code changes, the image of the table needs to be re-generated; we would have to keep them in sync... not ideal but I think it would be better than the current version.

@oruebel
Copy link
Contributor

oruebel commented May 3, 2022

We could potentially also use https://pypi.org/project/dataframe-image/ to render the table as PNG directly from the notebook

@oruebel oruebel added category: enhancement improvements of code or code behavior priority: medium non-critical problem and/or affecting only a small set of NWB users topic: docs issues related to documentation labels May 3, 2022
oruebel added a commit that referenced this issue May 3, 2022
oruebel added a commit that referenced this issue May 5, 2022
* Fix #1467 Use dataframe_image to render large dataframes as image in icephys tutorial
* Add dataframe_image and lxml to requirements-doc.txt
* Update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: enhancement improvements of code or code behavior priority: medium non-critical problem and/or affecting only a small set of NWB users topic: docs issues related to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants