cl1p.net - The internet clipboard
Login/Sign Up
cl1p.net/222
cl1p.net/222
Login/Sign Up
This cl1p will be deleted in in 3 days.
Copy
import pandas as pd import numpy as np from scipy.stats import skew, mode # Sample DataFrame (you can replace this with your actual data) data = { 'Sample_Column': [10, 12, 15, 14, 10, 18, 20, 15, 15, 14, 13, 12, 14, 17, 18] } df = pd.DataFrame(data) # Column to analyze col = 'Sample_Column' # Univariate analysis frequency = df[col].value_counts().sort_index() mean_val = df[col].mean() median_val = df[col].median() mode_val = df[col].mode().tolist() variance_val = df[col].var() std_dev = df[col].std() skewness_val = skew(df[col]) # Print results print("Univariate Analysis for:", col) print("Frequency:\n", frequency) print("Mean:", mean_val) print("Median:", median_val) print("Mode:", mode_val) print("Variance:", variance_val) print("Standard Deviation:", std_dev) print("Skewness:", skewness_val) EXP 6 from matplotlib import pyplot as plt import numpy as np import math x=np.arange(0,math.pi*2,0.05