-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Storage options #35381
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
Storage options #35381
Changes from 1 commit
3a54dde
f0922c4
e549f8d
e8540c4
0034bff
19f041d
f9e1e69
7f69afe
cc0e4c3
e356e93
c7170dd
b96778d
1dc41b1
d882984
f1e455d
c88b75f
58481a4
704770b
1b8637e
bbcef17
a18686c
fa656cb
e8d5312
a79a274
97c7263
e99f8ed
23f4fc4
38a8330
32cf204
682e9e5
f7f086c
b5138f0
afdc030
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,8 @@ to pass a dictionary of parameters to the storage backend. This allows, for | |
example, for passing credentials to S3 and GCS storage. The details of what | ||
parameters can be passed to which backends can be found in the documentation | ||
jreback marked this conversation as resolved.
Show resolved
Hide resolved
|
||
of the individual storage backends (detailed from the fsspec docs for | ||
`builtin implementations`_ and linked to `external ones`_). | ||
`builtin implementations`_ and linked to `external ones`_). See | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are these referenced in io.rst (more important that they are there), ok if they are here as well (but not really necessary) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I phrased it a bit differently (one general link, one specific instead of two specific) - I'll make the two places more similar. |
||
Section :ref:`io.remote`. | ||
|
||
.. _builtin implementations: https://filesystem-spec.readthedocs.io/en/latest/api.html#built-in-implementations | ||
.. _external ones: https://filesystem-spec.readthedocs.io/en/latest/api.html#other-known-implementations | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
|
||
from pandas._libs.lib import infer_dtype | ||
from pandas._libs.writers import max_len_string_array | ||
from pandas._typing import FilePathOrBuffer, Label | ||
from pandas._typing import FilePathOrBuffer, Label, StorageOptions | ||
from pandas.util._decorators import Appender | ||
|
||
from pandas.core.dtypes.common import ( | ||
|
@@ -1035,7 +1035,7 @@ def __init__( | |
columns: Optional[Sequence[str]] = None, | ||
order_categoricals: bool = True, | ||
chunksize: Optional[int] = None, | ||
storage_options: Optional[Dict[str, Any]] = None, | ||
storage_options: StorageOptions = None, | ||
): | ||
super().__init__() | ||
self.col_sizes: List[int] = [] | ||
|
@@ -1910,7 +1910,7 @@ def read_stata( | |
order_categoricals: bool = True, | ||
chunksize: Optional[int] = None, | ||
iterator: bool = False, | ||
storage_options: Optional[Dict[str, Any]] = None, | ||
storage_options: StorageOptions = None, | ||
) -> Union[DataFrame, StataReader]: | ||
|
||
reader = StataReader( | ||
|
@@ -1939,7 +1939,7 @@ def read_stata( | |
def _open_file_binary_write( | ||
fname: FilePathOrBuffer, | ||
compression: Union[str, Mapping[str, str], None], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can also add Compression to typing.py There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This wasn't me, but the styling; compression as a kwarg has different types in different places (most often str, but also There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm interesting, we ought to fix that. can you create an issue about this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not certain it's wrong - sometimes the args is required, but could be None, other times it's not required, but the default value can be None or str (e.g., "infer"). |
||
storage_options: Optional[Dict[str, Any]] = None, | ||
storage_options: StorageOptions = None, | ||
) -> Tuple[BinaryIO, bool, Optional[Union[str, Mapping[str, str]]]]: | ||
""" | ||
Open a binary file or no-op if file-like. | ||
|
@@ -2238,7 +2238,7 @@ def __init__( | |
data_label: Optional[str] = None, | ||
variable_labels: Optional[Dict[Label, str]] = None, | ||
compression: Union[str, Mapping[str, str], None] = "infer", | ||
storage_options: Optional[Dict[str, Any]] = None, | ||
storage_options: StorageOptions = None, | ||
): | ||
super().__init__() | ||
self._convert_dates = {} if convert_dates is None else convert_dates | ||
|
@@ -3121,7 +3121,7 @@ def __init__( | |
variable_labels: Optional[Dict[Label, str]] = None, | ||
convert_strl: Optional[Sequence[Label]] = None, | ||
compression: Union[str, Mapping[str, str], None] = "infer", | ||
storage_options: Optional[Dict[str, Any]] = None, | ||
storage_options: StorageOptions = None, | ||
): | ||
# Copy to new list since convert_strl might be modified later | ||
self._convert_strl: List[Label] = [] | ||
|
@@ -3526,7 +3526,7 @@ def __init__( | |
convert_strl: Optional[Sequence[Label]] = None, | ||
version: Optional[int] = None, | ||
compression: Union[str, Mapping[str, str], None] = "infer", | ||
storage_options: Optional[Dict[str, Any]] = None, | ||
storage_options: StorageOptions = None, | ||
): | ||
if version is None: | ||
version = 118 if data.shape[1] <= 32767 else 119 | ||
|
Uh oh!
There was an error while loading. Please reload this page.