Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé
Classe « HDFStore »

Méthode pandas.HDFStore.put

Signature de la méthode put

def put(self, key: 'str', value: 'DataFrame | Series', format=None, index: 'bool' = True, append: 'bool' = False, complib=None, complevel: 'int | None' = None, min_itemsize: 'int | dict[str, int] | None' = None, nan_rep=None, data_columns: 'Literal[True] | list[str] | None' = None, encoding=None, errors: 'str' = 'strict', track_times: 'bool' = True, dropna: 'bool' = False) -> 'None' 

Description

help(HDFStore.put)

Store object in HDFStore.

Parameters
----------
key : str
value : {Series, DataFrame}
format : 'fixed(f)|table(t)', default is 'fixed'
    Format to use when storing object in HDFStore. Value can be one of:

    ``'fixed'``
        Fixed format.  Fast writing/reading. Not-appendable, nor searchable.
    ``'table'``
        Table format.  Write as a PyTables Table structure which may perform
        worse but allow more flexible operations like searching / selecting
        subsets of the data.
index : bool, default True
    Write DataFrame index as a column.
append : bool, default False
    This will force Table format, append the input data to the existing.
data_columns : list of columns or True, default None
    List of columns to create as data columns, or True to use all columns.
    See `here
    <https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#query-via-data-columns>`__.
encoding : str, default None
    Provide an encoding for strings.
track_times : bool, default True
    Parameter is propagated to 'create_table' method of 'PyTables'.
    If set to False it enables to have the same h5 files (same hashes)
    independent on creation time.
dropna : bool, default False, optional
    Remove missing values.

Examples
--------
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])
>>> store = pd.HDFStore("store.h5", 'w')  # doctest: +SKIP
>>> store.put('data', df)  # doctest: +SKIP


Vous êtes un professionnel et vous avez besoin d'une formation ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé