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

preview_player
Показать описание
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 --

The code used in this video on GitHub:

One of my videos talking about conditional 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

print(df)

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

for individual_excel_file in excel_files:
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:

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!
Рекомендации по теме
Комментарии
Автор

Just discovered your channel and really like your very easy-to-follow tutorials and simple yet powerful examples. Keep it coming!

ChristianAndreassen
Автор

Awesome vids!!! I'm great at VBA and I'm trying to transfer those skills into Python. You're helping me out a whole lot.

rockeyvalley
Автор

Excellent video! This again demos why Python is so powerful!

tech
Автор

Omg you’re just great!! Can you do the same on directory. I’m interested in that too! Thanks a lot!

anissaa
Автор

I am from berlin, germany. Love your python + excel tutorials! Very helpful for my job. Totally on point and fun to watch. Thank u so much and all the best for you! (my first yt-comment ever)

RonKirchner
Автор

Would you mind uploading the excel files you use in the descrption, cannot find it :( Great vids, really appreciate them!

juancamilopuellopaternina
Автор

Great video Derrick, thank you. Could you please show us how to automatically loop through all Excel file in directory ? many thanks

amineboutaghou
Автор

thank you a thousand time for sharing your knowledge for free with us

maxbart
Автор

Hi Derrick- do you have a video where you show how to export the search results to another excel workbook, or CSV? Thanks

AcceptableBread
Автор

Great content! Loved the dog at the end.

PakDreamer
Автор

Hi, Derrick, Great Videos. Thank you for all the help that you are providing.

MritunjayKumar-ckhx
Автор

I want to this but I have a folder with 100+ excel files. Is there a way I can use the folder (call for every file in that folder) instead of plugging every single excel file like you did in line 12 ?

cris
Автор

Please do a make video about going through a directory(You mentioned that at 3:00). Please also include how we can match columns in multiple excel workbooks and return a new column displaying results like match or differ.

Iqbalvictorious
Автор

Great video Derrick. Great use cases. Very practical and bite sized tutorials!

toddbrannon
Автор

incredible, thank you for making these videos

kriptanight
Автор

did you ever make the video about running this script for every file in a directory?

justinmontgomery
Автор

Hi Derrick, this is really helpful and clear, thanks a lot! One question, how would you read multiple tabs from the same excel file and write into a new file and keeping the same tabs of the input file?

MarioIuliano
Автор

Great video. I need to search one specific string from many in one of the column and save all row to new file/sheet. (Many authors of one document in one column- I'm searching for one author)

darekpepe
Автор

Very helpful, thanks so much . Is it possible for you to upload video on how to run the where conditions on parameter based input from an ui

decentguyist
Автор

Derrick,

I'm enjoying your tutorial nuggets and would love to follow along. Maybe I missed it, but I haven't seen the Excel files listed in your Git repo. Are they hosted somewhere else?

MadLadsAnonymous