Hi, can someone please help me with this? I want to show the randomly sampled observations and the descriptive statistics together in one cell. However, as a beginner, I can only show one of them.
Here is my code:
import pandas as pd
iris = pd.read_csv('iris.csv') # Import the csv data
iris = iris.drop('Id', axis = 1) # Delete the 'Id' column
random = iris.sample(10) # Use the sample method to get 10 random samples
random # Show the 10 random samples
random.describe() # Get the descriptive stats
Thank you for your time and attention!