i have following code which runs extremly slow, optimize it so it run as fast as posibile:
import pandas as pd
import os

# The path where your CSV files are stored
daily_data_path = r"E:\01_calculate_talib\New folder\day"
hourly_data_path = r"E:\01_calculate_talib\New folder\1h"
four_data_path = r"E:\01_calculate_talib\New folder\4h"
week_data_path = r"E:\01_calculate_talib\New folder\week"
month_data_path = r"E:\01_calculate_talib\New folder\month"


def find_first_matching_1h(filename):

    for root, _, files in os.walk(hourly_data_path):
        for file in files:
            if file.split("_")[-2] == filename:
                return os.path.join(root, file)

    return None

def find_first_matching_4h(filename):

    for root, _, files in os.walk(four_data_path):
        for file in files:
            if file.split("_")[-2] == filename:
                return os.path.join(root, file)

    return None

def find_first_matching_week(filename):

    for root, _, files in os.walk(week_data_path):
        for file in files:
            if file.split("_")[-2] == filename:
                return os.path.join(root, file)

    return None

def find_first_matching_month(filename):

    for root, _, files in os.walk(month_data_path):
        for file in files:
            if file.split("_")[-2] == filename:
                return os.path.join(root, file)

    return None


# Iterate through each file in the csv_folder_path
def add_hourly_data(daily_df, hourly_df):
    # Generate the hourly column names dynamically based on available columns minus 'Date'
    hourly_column_names = [f"c{i}h_{col}" for i in range(1, 25) for col in hourly_df.columns if col != 'Date']

    # Combined DataFrame with adjusted columns
    combined_columns = list(daily_df.columns) + hourly_column_names
    combined_df = pd.DataFrame(columns=combined_columns)

    # Function to generate hourly data for a given day
    def get_hourly_data_for_day(day):
        filtered_hourly_df = hourly_df[hourly_df['Date'] == day]
        hourly_data = []
        for _, row in filtered_hourly_df.iterrows():
            for col in filtered_hourly_df.columns:
                if col != 'Date':
                    hourly_data.append(row[col])
        while len(hourly_data) < len(hourly_column_names):
            hourly_data.append(None)  # Append None for missing data
        return hourly_data

    for _, daily_row in daily_df.iterrows():
        daily_data = daily_row.tolist()
        day = daily_row['Date'].date()
        hourly_data = get_hourly_data_for_day(day)
        combined_row = daily_data + hourly_data
        combined_df = pd.concat([combined_df, pd.DataFrame([combined_row], columns=combined_columns)],
                                ignore_index=True)

    return combined_df

def add_four_data(prev_combined_df, four_df):
    # Generate the hourly column names dynamically based on available columns minus 'Date'
    four_column_names = [f"c{i}_4h_{col}" for i in range(1, 7) for col in four_df.columns if col != 'Date']

    # Combined DataFrame with adjusted columns
    combined_columns = list(prev_combined_df.columns) + four_column_names
    combined_df = pd.DataFrame(columns=combined_columns)

    # Function to generate hourly data for a given day
    def get_four_data_for_day(day):
        filtered_four_df = four_df[four_df['Date'] == day]
        four_data = []
        for _, row in filtered_four_df.iterrows():
            for col in filtered_four_df.columns:
                if col != 'Date':
                    four_data.append(row[col])
        while len(four_data) < len(four_column_names):
            four_data.append(None)  # Append None for missing data
        return four_data

    for _, daily_row in prev_combined_df.iterrows():
        daily_data = daily_row.tolist()
        day = daily_row['Date'].date()
        four_data = get_four_data_for_day(day)
        combined_row = daily_data + four_data
        combined_df = pd.concat([combined_df, pd.DataFrame([combined_row], columns=combined_columns)],
                                ignore_index=True)

    return combined_df

def add_week_data(prev_combined_df, week_df):
    # Generate the hourly column names dynamically based on available columns minus 'Date'
    week_column_names = [f"c{i}_w_{col}" for i in range(1, 3) for col in week_df.columns if col != 'Date']

    # Combined DataFrame with adjusted columns
    combined_columns = list(prev_combined_df.columns) + week_column_names
    combined_df = pd.DataFrame(columns=combined_columns)

    # Function to generate hourly data for a given day
    def get_week_data_for_day(day):
        filtered_week_df = week_df[week_df['Date'] == day]
        week_data = []
        for _, row in filtered_week_df.iterrows():
            for col in filtered_week_df.columns:
                if col != 'Date':
                    week_data.append(row[col])
        while len(week_data) < len(week_column_names):
            week_data.append(None)  # Append None for missing data
        return week_data

    for _, daily_row in prev_combined_df.iterrows():
        daily_data = daily_row.tolist()
        day = daily_row['Date'].date()
        week_data = get_week_data_for_day(day)
        combined_row = daily_data + week_data
        combined_df = pd.concat([combined_df, pd.DataFrame([combined_row], columns=combined_columns)],
                                ignore_index=True)

    return combined_df

def add_month_data(prev_combined_df, month_df):
    # Generate the hourly column names dynamically based on available columns minus 'Date'
    month_column_names = [f"c{i}_m_{col}" for i in range(1, 2) for col in month_df.columns if col != 'Date']

    # Combined DataFrame with adjusted columns
    combined_columns = list(prev_combined_df.columns) + month_column_names
    combined_df = pd.DataFrame(columns=combined_columns)

    # Function to generate hourly data for a given day
    def get_month_data_for_day(day):
        filtered_month_df = month_df[month_df['Date'] == day]
        month_data = []
        for _, row in filtered_month_df.iterrows():
            for col in filtered_month_df.columns:
                if col != 'Date':
                    month_data.append(row[col])
        while len(month_data) < len(month_column_names):
            month_data.append(None)  # Append None for missing data
        return month_data

    for _, daily_row in prev_combined_df.iterrows():
        daily_data = daily_row.tolist()
        day = daily_row['Date'].date()
        month_data = get_month_data_for_day(day)
        combined_row = daily_data + month_data
        combined_df = pd.concat([combined_df, pd.DataFrame([combined_row], columns=combined_columns)],
                                ignore_index=True)

    return combined_df

for daily_csv_file in os.listdir(daily_data_path):

    try:

        daily_file_path = os.path.join(daily_data_path, daily_csv_file)
        hourly_file_path = find_first_matching_1h(daily_csv_file.split('_')[-2])
        four_file_path = find_first_matching_4h(daily_csv_file.split('_')[-2])
        week_file_path = find_first_matching_week(daily_csv_file.split('_')[-2])
        month_file_path = find_first_matching_month(daily_csv_file.split('_')[-2])
        print(f'processig {daily_csv_file}'
              f' with {hourly_file_path}'
              f' with {four_file_path}'
              f' with {week_file_path}'
              f' with {month_file_path}')
        # Load the daily and hourly data from CSV files
        daily_df = pd.read_csv(daily_file_path)
        hourly_df = pd.read_csv(hourly_file_path)
        four_df = pd.read_csv(four_file_path)
        week_df = pd.read_csv(week_file_path)
        month_df = pd.read_csv(month_file_path)

        daily_df['Date'] = pd.to_datetime(daily_df['Date'], format="ISO8601", utc=True)
        hourly_df['Date'] = pd.to_datetime(hourly_df['Date'],format="ISO8601", utc=True)
        four_df['Date'] = pd.to_datetime(four_df['Date'], format="ISO8601", utc=True)
        week_df['Date'] = pd.to_datetime(week_df['Date'], format="ISO8601", utc=True)
        month_df['Date'] = pd.to_datetime(month_df['Date'], format="ISO8601", utc=True)

        # Strip time part from hourly_df 'Date' for alignment
        hourly_df['Date'] = hourly_df['Date'].dt.date
        four_df['Date'] = four_df['Date'].dt.date
        week_df['Date'] = week_df['Date'].dt.date
        month_df['Date'] = month_df['Date'].dt.date

        combined_df = add_hourly_data(daily_df, hourly_df)
        combined_df = add_four_data(combined_df, four_df)
        combined_df = add_week_data(combined_df, week_df)
        combined_df = add_month_data(combined_df, month_df)

        # Save the combined DataFrame
        combined_df.to_csv(daily_file_path, index=False)
        print('Combined CSV has been saved.')

    except Exception as e:
        print(f"------------------>>>>>>>>>>>>>>>>>>>>>>>>    An error occurred while processing {daily_file_path}: {e}")