Untitled
unknown
plain_text
6 months ago
522 B
3
Indexable
import pandas as pd # Sample data for HPLC analysis data = { 'Compound_Name': ['Flavonoid 1', 'Flavonoid 2', 'Phenolic acid 1', 'Phenolic acid 2'], 'Retention_Time': [5.2, 7.5, 10.1, 12.3], 'Peak_Area': [1000, 800, 1200, 900] } # Create a pandas DataFrame with specific data types df = pd.DataFrame(data, dtype={'Retention_Time': float, 'Peak_Area': int}) # Print the DataFrame print(df) # Calculate the mean peak area mean_peak_area = df['Peak_Area'].mean() print(f'Mean peak area: {mean_peak_area:.2f}')
Editor is loading...
Leave a Comment