Skip to content

poreflow.StepsDataFrame

Bases: DataFrame

Steps data frame

Data frame must contain the following columns: - start_idx (integers): The start index of the step in the event - end_idx (integers): The end index of the step in the event - std (float): The standard deviation of the current during the step - mean (float): The mean of the current during the step - n_pts (int): The number of points in the step

Other optional columns are: - start_time (float): The start time of the step - end_time (float): The end time of the step - dwell_time (float): The dwell time of the step - event (int): The event number of the step. Useful when concatenating multiple step dataframes - step_idx (int): The index of the step in the event

add_channel(channel=1)

Adds a channel column to the DataFrame.

Parameters:

Name Type Description Default
channel int

Channel number to add. Defaults to 1.

1

Returns:

Type Description

None

add_event(event=1)

Adds an event column to the DataFrame.

Parameters:

Name Type Description Default
event int

Event number to add. Defaults to 1.

1

Returns:

Type Description

None

add_step_idx()

Adds a step index column to the DataFrame.

Adds sequential step indices starting from 0.

Returns:

Type Description

None

as_dataframe()

Converts the StepsDataFrame to a regular pandas DataFrame.

Returns:

Type Description

pd.DataFrame: Regular pandas DataFrame without poreflow metadata.