Skip to content

DOC: fix EX03 Errors for pandas.read_json #56865

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

Closed

Conversation

erichxchen
Copy link
Contributor

Fix these EX03 Errors for pandas.read_json

flake8 error: line 6, col 23: F821 undefined name '_'
flake8 error: line 8, col 23: F821 undefined name '_'
flake8 error: line 10, col 23: F821 undefined name '_'

@erichxchen erichxchen requested a review from mroeschke as a code owner January 14, 2024 03:46
@erichxchen erichxchen changed the title Fix EX03 Errors for pandas.read_json DOC: fix EX03 Errors for pandas.read_json Jan 14, 2024
@@ -717,7 +717,7 @@ def read_json(
"data":[["a","b"],["c","d"]]\
}}\
'
>>> pd.read_json(StringIO(_), orient='split')
>>> pd.read_json(StringIO(_), orient='split') # doctest: +SKIP
Copy link
Member

Choose a reason for hiding this comment

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

Since we are already creating the dataframe and calling to_json I think it'd be better to save the dataframe to a StringIO object, display it so users can continue to see how the json looks like, and then make this work by reading the StringIO object. What do you think?

@datapythonista
Copy link
Member

The CI wasn't working to validate those docstrings. It's now been fixed, and there are some errors here and in your other PR, can you have a look please?

@erichxchen
Copy link
Contributor Author

The CI wasn't working to validate those docstrings. It's now been fixed, and there are some errors here and in your other PR, can you have a look please?

I am actually confused about why it still errored out when commented with # doctest: +SKIP and # noqa: E501 (also in another PR). I will dig into when I have more spare time.

@mroeschke
Copy link
Member

Closed by #57025

@mroeschke mroeschke closed this Jan 23, 2024
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.

3 participants