axon_population.get_sub_population

axon_population.get_sub_population(expr: str | None = None, mask_labels: None | Iterable[str] | str = [], placed_only: bool = True) <MagicMock name='mock.DataFrame' id='4417977760'>

Get a sub population from an expression or a list of labels.

Note

For supopulation from expression look at pandas.DataFrame.eval() or pandas.DataFrame.query() documentation.

Tip

To simplify, self.get_mask() correspond to pandas.DataFrame.eval() and self.get_sub_population() correspond to pandas.DataFrame.query()

Parameters:
  • expr (str | None, optional) – If not None mask is generated using pandas.DataFrame.eval() of this expression, by default None

  • mask_labels (None | Iterable[str] | str, optional) – Label or list of labels already added to the population, by default []

  • placed_only (bool, optional) – if True add “is_place” column to the mask, by default True

  • otype (None | Literal[&quot;numpy&quot;, &quot;list&quot;], optional) – type of the output see df_to(), by default None

Returns:

Containing the subpopulation parameters.

Return type:

DataFrame