Skip to content

DOC: How to use storage_option param here to integrate with GCP bucket? #45928

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 9 commits into from
Feb 15, 2022

Conversation

purna135
Copy link
Contributor

@purna135
Copy link
Contributor Author

Hi @MarcoGorelli, I altered a few files, but there are still a few that offer a brief description of the storage options, as shown below.
Please let me know if these files need to be corrected as well.

storage_options : dict, optional
Extra options that make sense for a particular storage connection,
e.g. host, port, username, password, etc.,

storage_options : dict, optional
passed to fsspec for appropriate URLs (see ``_get_filepath_or_buffer``)

storage_options : dict, optional
passed to fsspec for appropriate URLs (see ``_get_filepath_or_buffer``)

storage_options : dict, optional
passed to fsspec for appropriate URLs (see ``_get_filepath_or_buffer``)

storage_options : dict, optional
passed to fsspec for appropriate URLs (see ``_get_filepath_or_buffer``)

pandas/pandas/io/xml.py

Lines 101 to 103 in c24a3c8

storage_options : dict, optional
Extra options that make sense for a particular storage connection,
e.g. host, port, username, password, etc.,

@twoertwein
Copy link
Member

Hi @MarcoGorelli, I altered a few files, but there are still a few that offer a brief description of the storage options, as shown below. Please let me know if these files need to be corrected as well.

If possible, it might be great to share the doc-strings between all of these methods. I think we already have shared docs for storage_options:

from pandas.util._decorators import doc
from pandas.core.shared_docs import _shared_docs

@doc(storage_options=_shared_docs["storage_options"])
def some_function():
    """
    {storage_options}
    """

@purna135
Copy link
Contributor Author

I shared the doc-strings over all of the methods, with the exception of the _base file, which isn't a function.

storage_options : dict, optional
Extra options that make sense for a particular storage connection, e.g.
host, port, username, password, etc., if using a URL that will
be parsed by ``fsspec``, e.g., starting "s3://", "gcs://". An error
will be raised if providing this argument with a local path or
a file-like buffer. See the fsspec and backend storage implementation
docs for the set of allowed keys and values.
.. versionadded:: 1.2.0

@purna135
Copy link
Contributor Author

Hello, @twoertwein. Could you please assist me in determining what I am doing incorrectly?

@twoertwein
Copy link
Member

I shared the doc-strings over all of the methods, with the exception of the _base file, which isn't a function.

I think you can replace the section with {storage_options} and then add the decorator here

def read_excel(

@twoertwein
Copy link
Member

Hello, @twoertwein. Could you please assist me in determining what I am doing incorrectly?

What are you having trouble with? Some tests sometimes randomly fail, the faillures do not seem related to your changes.

@purna135
Copy link
Contributor Author

What are you having trouble with? Some tests sometimes randomly fail, the faillures do not seem related to your changes.

Thank you : )
I had previously added {storage options} to the base file, but it failed several tests, so I redo the changes.
let me change and push it again.

@jreback jreback added Docs IO Data IO issues that don't fit into a more specific label labels Feb 13, 2022
@purna135
Copy link
Contributor Author

Hello, @twoertwein. Please take a look at the adjustments I made.

@MarcoGorelli
Copy link
Member

Hey @purna135 - did you try building this locally? I think it'd be helpful if you could post screenshots of the amended docstrings

@purna135
Copy link
Contributor Author

Yes I have built this locally and bellow is the screanshot of amended docstrings.

image

Copy link
Member

@twoertwein twoertwein left a comment

Choose a reason for hiding this comment

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

Thanks @purna135! Let's wait for the CI to finish but otherwise looks good to me!

@purna135
Copy link
Contributor Author

purna135 commented Feb 15, 2022

Should I share a screencap of the part where I replaced {...} with {{...}} to repair the unescaped braces error?

@purna135
Copy link
Contributor Author

Thank you so much for your support and guidance, @twoertwein; as a newbie, it was extremely helpful.

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Thanks @purna135 , and thanks @twoertwein for reviewing!

@MarcoGorelli MarcoGorelli added this to the 1.5 milestone Feb 15, 2022
@MarcoGorelli MarcoGorelli merged commit 754aca4 into pandas-dev:main Feb 15, 2022
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
…t? (pandas-dev#45928)

* added storage_options description

* shared the doc-strings between all the methods

* shared the doc-strings between all the methods

* shared the doc-strings between all the methods

* replaced {storage_options} in _base file

* replaced {storage_options} in _base file

* fixed unescaped braces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: How to use storage_option param here to integrate with GCP bucket?
4 participants