|
openPMD-api
|
Functions | |
| def | particles_to_dataframe (particle_species, slice=None) |
Variables | |
| bool | found_pandas = True |
This file is part of the openPMD-api. Copyright 2021 openPMD contributors Authors: Axel Huebl License: LGPLv3+
| def openpmd_api.DataFrame.particles_to_dataframe | ( | particle_species, | |
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.
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
1.8.13