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

Publicado em: 01 Junho 2019
no canal de: 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!


Nesta página do site você pode assistir ao vídeo on-line Conditional Search Multiple Excel Files - Excel Python Automation - Five Minute Python Scripts duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Derrick Sherrill 01 Junho 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 57,153 vezes e gostou 1.2 mil espectadores. Boa visualização!