Skip to content

DOC: Add .to_xyz to io docs #41844

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

Merged
merged 8 commits into from
Jun 16, 2021
Merged

DOC: Add .to_xyz to io docs #41844

merged 8 commits into from
Jun 16, 2021

Conversation

gansel51
Copy link
Contributor

@gansel51 gansel51 commented Jun 6, 2021

Screenshot below for updated docs

Screen Shot 2021-06-06 at 7 03 23 PM

Copy link
Contributor

@attack68 attack68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks v m @gansel51.

Few comments in line and also:

Can you add a section on LaTeX and add:
DataFrame.to_latex and Styler.to_latex

@gfyoung gfyoung added the Docs label Jun 7, 2021
@gansel51
Copy link
Contributor Author

gansel51 commented Jun 7, 2021

@attack68 For sure. I added the DataFrame.to_latex method on a feature branch I'll merge when complete. Looking into the Styler methods now because an import error blocked my original request.

@gansel51
Copy link
Contributor Author

gansel51 commented Jun 7, 2021

@attack68 Added those methods, ready for re-review!

@gansel51 gansel51 requested a review from attack68 June 7, 2021 16:00
@attack68
Copy link
Contributor

attack68 commented Jun 7, 2021

@attack68 Added those methods, ready for re-review!

can you post a render of the page.. i cant generate it or see it here, and just want to check it looks right and has active links?

@gansel51
Copy link
Contributor Author

gansel51 commented Jun 7, 2021

Screen Shot 2021-06-07 at 1 15 28 PM

@attack68 yeah, here's a screenshot which shows a cross section of the three types of changes:

  1. Add new section for LaTeX
  2. Add DataFrame.to_xyz
  3. Add Styler.to_xyz

Copy link
Contributor

@attack68 attack68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

This is better with the increased info and links. Would be nice if as a follow on we could get the columns aligning, i.e. by merging the Styler and DataFrame tocs so they dont have different alignment.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Just out of curiosity why are some but not all of these namespaced with DataFrame...

@gansel51
Copy link
Contributor Author

gansel51 commented Jun 8, 2021

@WillAyd The DataFrame.to_xyz methods have the DataFrame modifier because they are DataFrame methods and must be done on one. The remaining IO methods aren't done on DataFrames (just pandas or Styler) so didn't have that prefix. It both lets Sphynx pick up the methods (otherwise they won't be found by the autosummary) and gives users more accurate usage information. You'll notice it is only the output methods that are Dataframe... while the input methods are just pandas...

Copy link
Contributor

@attack68 attack68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be some CI errors. The docs don't build without errors, I think because the current module is changed in one part of pandas.io.formats.style and then ExcelWriter is referenced.

@gansel51
Copy link
Contributor Author

gansel51 commented Jun 8, 2021

There seems to be some CI errors. The docs don't build without errors, I think because the current module is changed in one part of pandas.io.formats.style and then ExcelWriter is referenced.

@attack68 The docs didn't build without errors when I first tried pre-PR either, but I switched the current module back for ExcelWriter and it is generating properly. I can't kick off the workflows myself, so we'll need to wait until someone else (@WillAyd?) or you (if able) can do so to see if they pass. See screenshot below for ExcelWriter:

Screen Shot 2021-06-08 at 11 14 55 AM

@gansel51
Copy link
Contributor Author

gansel51 commented Jun 8, 2021

@attack68 I went ahead and resolved the warnings on the page as well. The page is rendering properly for me with no errors.

@gansel51 gansel51 requested review from WillAyd and attack68 June 8, 2021 15:27
@jreback jreback added this to the 1.3 milestone Jun 8, 2021
@jreback
Copy link
Contributor

jreback commented Jun 8, 2021

lgtm. can merge on green.

@gansel51
Copy link
Contributor Author

gansel51 commented Jun 8, 2021

lgtm. can merge on green.

Thanks @jreback will keep an eye on the checks

@jreback
Copy link
Contributor

jreback commented Jun 8, 2021

@gansel51
Copy link
Contributor Author

gansel51 commented Jun 8, 2021

https://github.com/pandas-dev/pandas/pull/41844/checks?check_run_id=2777904153

I can switch that, but LaTeX is the proper capitalization for the project (see LaTeX Website). Please advise if I should switch it or if there is a way to override that check @jreback

@gansel51
Copy link
Contributor Author

gansel51 commented Jun 8, 2021

@jreback I just made the change since it is easily revertible.

@jreback
Copy link
Contributor

jreback commented Jun 9, 2021

actually this is coming from our validate_rst_ checker cc @MarcoGorelli i think there is a way to ignore it

@gansel51
Copy link
Contributor Author

@jreback cc @MarcoGorelli Any update here?

@simonjayhawkins
Copy link
Member

moving off 1.3 milestone for now.

@simonjayhawkins simonjayhawkins removed this from the 1.3 milestone Jun 10, 2021
@MarcoGorelli
Copy link
Member

MarcoGorelli commented Jun 10, 2021

Looks like there's a new

/home/runner/work/pandas/pandas/pandas/io/json/_normalize.py:240:SS04:pandas.io.json.json_normalize:Summary contains heading whitespaces

actually this is coming from our validate_rst_ checker cc @MarcoGorelli i think there is a way to ignore it

Can use exclude to exclude it from a file


"LaTex" should probably be "allowlisted" in the check though - @gansel51 if you wanted to contribute that in a separate PR it would be welcome!

@gansel51
Copy link
Contributor Author

@jreback @MarcoGorelli @attack68 I removed the deprecated method from the documentation, kicking off a new build could (should?) solve the issue so this PR can merge. I can definitely look into putting LaTeX in the allowlisted next!

@gansel51
Copy link
Contributor Author

@attack68 I'm not seeing where the checks are failing and not just failing because of a cancellation, can you point me in the right direction?

@simonjayhawkins
Copy link
Member

/home/runner/work/pandas/pandas/doc/source/reference/api/pandas.to_pickle.rst:40: WARNING: Citation [Recbd1b9f7896-1] is not referenced.

in https://github.com/pandas-dev/pandas/pull/41844/checks?check_run_id=2800940727

@jreback
Copy link
Contributor

jreback commented Jun 16, 2021

@gansel51 this is ok for 1.3 after its passing.

@jreback jreback added this to the 1.3 milestone Jun 16, 2021
@attack68
Copy link
Contributor

@attack68 I'm not seeing where the checks are failing and not just failing because of a cancellation, can you point me in the right direction?

isnt this because it should be DataFrame.to_pickle. if pandas.to_pickle isnt there that will produce the error simonjayhawkins highlighted

@gansel51
Copy link
Contributor Author

@attack68 @simonjayhawkins Thanks for pointing it out, I was having trouble isolating the error from the logs. Made that change, will keep an eye on the workflow status.

@jreback jreback merged commit 5153334 into pandas-dev:master Jun 16, 2021
@jreback
Copy link
Contributor

jreback commented Jun 16, 2021

thanks @gansel51

@jreback
Copy link
Contributor

jreback commented Jun 16, 2021

@meeseeksdev backport 1.3.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jun 16, 2021

Something went wrong ... Please have a look at my logs.

jreback pushed a commit that referenced this pull request Jun 17, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Input/Output page contains only input functions
7 participants