Functions | |
| particles_to_dataframe (particle_species, *legacy_args, attributes=None, slice=None) | |
| iterations_to_dataframe (series, species_name, attributes=None) | |
| iterations_to_cudf (series, species_name, attributes=None) | |
This file is part of the openPMD-api. Copyright 2021 openPMD contributors Authors: Axel Huebl License: LGPLv3+
| openpmd_api.DataFrame.iterations_to_cudf | ( | series, | |
| species_name, | |||
| attributes = None ) |
Load all iterations of a particle species into a cuDF DataFrame.
Parameters
----------
series : openpmd_api.Series
A Series class in openPMD-api.
species_name : string
The name of a particle species.
attributes : list of strings, optional
A list of attributes of the particle_species that should be read and
added as extra columns.
Returns
-------
cudf.DataFrame
A cuDF (RAPIDS) dataframe with particles as index and openPMD record
components of the particle_species as columns. Particles might be
repeated over multiple iterations and an "iteration" column is
added.
Raises
------
ImportError
Raises an exception if cuDF (RAPIDS) is not installed
See Also
--------
cudf.DataFrame : the central dataframe object created here
| openpmd_api.DataFrame.iterations_to_dataframe | ( | series, | |
| species_name, | |||
| attributes = None ) |
Load all iterations of a particle species into a Pandas DataFrame.
Parameters
----------
series : openpmd_api.Series
A Series class in openPMD-api.
species_name : string
The name of a particle species.
attributes : list of strings, optional
A list of attributes of the particle_species that should be read and
added as extra columns.
Returns
-------
pandas.DataFrame
A pandas dataframe with particles as index and openPMD record
components of the particle_species as columns. Particles might be
repeated over multiple iterations and an "iteration" column is
added.
Raises
------
ImportError
Raises an exception if pandas is not installed
See Also
--------
pandas.DataFrame : the central dataframe object created here
| openpmd_api.DataFrame.particles_to_dataframe | ( | particle_species, | |
| * | legacy_args, | ||
| attributes = None, | |||
| slice = None ) |
Load all records of a particle species into a Pandas DataFrame.
Parameters
----------
particle_species : openpmd_api.ParticleSpecies
A ParticleSpecies class in openPMD-api.
legacy_args : tuple
DO NOT USE. Catch-all for legacy, unnamed arguments.
attributes : list of strings, optional
A list of attributes of the particle_species that should be read and
added as extra columns.
slice : np.s_, optional
A numpy slice that can be used to load only a sub-selection of
particles.
Returns
-------
pandas.DataFrame
A pandas dataframe with particles as index and openPMD record
components of the particle_species as columns.
Raises
------
ImportError
Raises an exception if pandas is not installed
See Also
--------
numpy.s_ : the slice object to sub-select
openpmd_api.BaseRecordComponent.available_chunks : available chunks that
are optimal arguments for the slice parameter
pandas.DataFrame : the central dataframe object created here