import pandas as pd # Read the data from a CSV file (replace 'your_file.csv' with your actual file path) df = pd.read_csv('your_file.csv') # Convert 'Date' column to datetime df['Date'] = pd.to_datetime(df['Date'], format='%m/%d/%Y') # Create a new DataFrame with minimum daily vaccinations for each country min_daily_vaccinations = df.groupby('Country')['Daily_Vaccinations'].min().reset_index() min_daily_vaccinations.columns = ['Country', 'Min_Daily_Vaccinations'] # Merge the original DataFrame with the minimum daily vaccinations DataFrame df = pd.merge(df, min_daily_vaccinations, on='Country', how='left') # Fill missing values in 'Daily_Vaccinations' with the minimum daily vaccinations df['Daily_Vaccinations'] = df['Daily_Vaccinations'].fillna(df['Min_Daily_Vaccinations']) # Drop the 'Min_Daily_Vaccinations' column if you don't need it df = df.drop(columns=['Min_Daily_Vaccinations']) # Fill remaining missing values with 0 df['Daily_Vaccinations'] = df['Daily_Vaccinations'].fillna(0) # Print the final DataFrame print(df)