Conditional Search Multiple Excel Files - Excel Python Automation - Five Minute Python Scripts

Veröffentlicht am: 01 Juni 2019
auf dem Kanal: Derrick Sherrill
57,153
1.2k

In this video we'll cover how to can use Python and Pandas to conditionally search for values across multiple spreadsheets and return multiple values back when the conditional is true.

If you have any comments or suggestions for the next video, please let me know! I appreciate you all.

Kite helps fund the channel, thanks for checking them out and supporting me --
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. https://www.kite.com/get-kite/?utm_me...

The code used in this video on GitHub:
https://github.com/Derrick-Sherrill/D...

One of my videos talking about conditional statements:
   • Learn Python #11 - If Statements  

Thanks so much for all the support!! 2600+ SUBSCRIBERS! You all are incredible. Thanks so much for your continued support. It means the world.

*****************************************************************
Full code from the video:

import numpy as np
import pandas as pd

excel_file = 'Pandas_Workbook.xlsx'
df = pd.read_excel(excel_file)
print(df)

print(df['Name'].where(df['Occupation'] == 'Programmer'))
programmers = df['Name'].where(df['Occupation'] == 'Programmer')
print(programmers.dropna())

excel_files = ['Pandas_Workbook.xlsx','Pandas_Workbook_copy.xlsx','Pandas_Workbook_copy_2.xlsx']

for individual_excel_file in excel_files:
df = pd.read_excel(individual_excel_file)
programmers = df['Name'].where(df['Occupation'] == 'Programmer').dropna()
print("File Name" + individual_excel_file)
print(programmers)

*****************************************************************
Code from this tutorial and all my others can be found on my GitHub:
https://github.com/Derrick-Sherrill/D...

Check out my website:
https://www.derricksherrill.com/

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!


Auf dieser Seite können Sie das Online-Video Conditional Search Multiple Excel Files - Excel Python Automation - Five Minute Python Scripts mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Derrick Sherrill 01 Juni 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 57,153 Mal angesehen und es wurde von 1.2 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!