Automate Excel Pivot Tables Across Workbooks – Learn Python Pandas


    Hey Everyone! Continuing the Pandas series. In this one we’ll work with multiple spreadsheets and use the GroupBy pandas function.

    We’ll cover:
    – Combining data sources
    – Grouping data from multiple sources

    #Python #Pandas #FiveMinutePythonScripts

    Thanks so much for all the support! You all are incredible. Everything I type this message in my video descriptions it makes me smile. 3930+ Subscribers! How awesome – Thank you all 🙂

    The Excel Sheets I used (Just dummy data):
    Workbook1.xlsx –

    A second (optional workbook with same data structure) –

    Full code from the video:
    import pandas as pd

    excel_file = ‘Workbook1.xlsx’

    df_1 = pd.read_excel(excel_file)
    df_2 = pd.read_excel(excel_file, sheet_name=’2nd’)


    frames = [df_1, df_2]
    all_data_df = pd.concat(frames, axis=0)

    productivity_df = all_data_df.groupby([‘Operator’,’Line #’]).mean() #.min() .max() . sum()

    Code from this tutorial and all my others can be found on my GitHub:

    Check out my website:

    If you liked the video – please hit the like button. It means more than you know. Thanks for watching and thank you for all your support!!

    Always looking for suggestions on what video to make next — leave me a comment with your project! Happy Coding!


    Previous articleBusiness Analyst Interview Questions and Answers | Business Analyst Interview Preparation
    Next articleCore concepts of boto3 for AWS