Pandas and tabular experimental data
A DataFrame gives each row an observation and each column a measured or recorded variable.
Loading video…
A DataFrame gives each row an observation and each column a measured or recorded variable. Boolean filtering keeps selected rows; groupby aggregation compresses rows into summaries. Use loc to select rows and columns together, inspect missing values and never silently treat absent measurements as zeros. Record whether a group mean includes all available replicates.
Worked example
In a table with treatment and expression, df.loc[df['treatment']=='drug', 'expression'] selects drug rows; df.groupby('treatment')['expression'].mean() computes one mean per group.