No video

Stop Wasting Time on Simple Excel Tasks, Use Python

  Рет қаралды 10,119

John Watson Rooney

John Watson Rooney

Күн бұрын

Пікірлер: 49
@JohnWatsonRooney
@JohnWatsonRooney 6 ай бұрын
To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/JohnWatsonRooney . The first 200 of you will get 20% off Brilliant’s annual premium subscription.
@mathewrtaylor
@mathewrtaylor 6 ай бұрын
Great tips! A suggestion as an addition, I would add to help with the potential memory issues of all the data frames is to import gc, and in your processing loop add: del [[df]] gc.collect This will delete and remove from memory the df dataframe since you've already appended it to data in each iteration. This has saved me several times with memory issues. Hope this helps!
@JohnWatsonRooney
@JohnWatsonRooney 6 ай бұрын
thanks thats very helpful!
@kashifrana6798
@kashifrana6798 Ай бұрын
Can you please exactly let me know where we need to add these two lines? Thx
@oOBenictusOo
@oOBenictusOo 6 ай бұрын
I usually find your videos top-notch, but this case can also be permanently solved with Power Query in a maximum setup time of 5 minutes... looking forward to your next video, cheers.
@rcdny
@rcdny 6 ай бұрын
very true. since i learned power query i've saved 2hrs a day
@samuelmartins82
@samuelmartins82 6 ай бұрын
he's just giving an example of the many types of automations that can be done with python. If you just need simple data processing, power query will do the job. But when you need to do something more complex, like getting some information from the web in real time, sending several emails with reports, etc.. power query will be useless
@oOBenictusOo
@oOBenictusOo 6 ай бұрын
@@samuelmartins82 Agreed, but here's the context as described in the title: it's a simple Excel task and not complex. Sure, it can be solved with Python, but I don't agree with the argument about wasting time in this context. This recurring task is solved faster and, in the long run, more efficiently with Power Query. Nonetheless, it's interesting because the presented solution could be the beginning of a slightly more complex solution.
@imconfused1237
@imconfused1237 6 ай бұрын
@@oOBenictusOoAgree, these techniques are ‘building blocks’ for much more involved and often fully bespoke ground-up solutions. It can be considered foundation knowledge. However, as you rightly say, simple ETL data operations are best met with optimised tooling, such as PowerQuery. It also avoids creating solutions which require expensive dev’s to support.
@tmb8807
@tmb8807 Ай бұрын
I'm sure you know this by now, but the Polars read_csv method supports glob patterns, so the loop approach is unnecessary - you can simply pass _folder + "/*.csv"_ as the source parameter and the concatenation will be done automatically.
@JohnWatsonRooney
@JohnWatsonRooney Ай бұрын
Yea you are right that’s much better thanks for clarifying!
@AliceShisori
@AliceShisori 6 ай бұрын
thank you for yet another highly-applicable video John. just out of curiosity since you made this video and I know you are more well-versed in data extraction, do you plan to make anything else about excel and data manipulation :D ?
@JohnWatsonRooney
@JohnWatsonRooney 6 ай бұрын
thanks - Yes I'd like to do a bit more on that side, i'll have a think and put some ideas together!
@eziola
@eziola 6 ай бұрын
Keep doing data cleaning examples in Pandas! Could be a lot of views for videos like these. Great video! Thank you
@adarshjamwal3448
@adarshjamwal3448 6 ай бұрын
Great job john thanks for this content. I think your channel may be grow more. If you make and put another types of content like django, flask, javascript like that.
@tridibbiswas3361
@tridibbiswas3361 6 ай бұрын
Thank you the video. These simple tutorials help people like to grasp some of the rudiments of the learning a programming language like python. BTW could you share the like to your dot files for nevoim. Would like to use of the stuff seen in your nevoim and figure out how to do it
@JohnWatsonRooney
@JohnWatsonRooney 6 ай бұрын
hey, thanks. my neovim is basically kickstart.ncim by teej, and a simple tmux. not a lot extra!
@tridibbiswas3361
@tridibbiswas3361 6 ай бұрын
@@JohnWatsonRooney Thank you
@Pankaj-Verma-
@Pankaj-Verma- 6 ай бұрын
Thanks.
@infamous8541
@infamous8541 6 ай бұрын
Why not use knime instead?
@Kiriletto
@Kiriletto 3 ай бұрын
Great vid. Can you tell me why, after you have appended the files in the loop (which I assume merges them together within the list) you then concatenate them into a new data store (ie the result)? Aren’t you combining them twice? Thanks
@tmb8807
@tmb8807 Ай бұрын
The variable 'data' here is not a dataframe. It's a Python list which contains multiple distinct dataframes (one for each file in 'files'). pd.concat is used to append them all into a single dataframe object ('result').
@Rice0987
@Rice0987 6 ай бұрын
While I'm using power query.🤗
@Rice0987
@Rice0987 6 ай бұрын
But thank you for your channel, cause i'm have started to move in python direction. :)
@hoegge
@hoegge 6 ай бұрын
Good intro on how to do this in Python, but it is not faster than Excel in any way - neither first nor subsequent runs. A video demonstrating this in Excel would take less than 1-2 minutes.
@acharafranklyn5167
@acharafranklyn5167 6 ай бұрын
I noticed you dont like using ipynb files.....Great content
@markbennett5626
@markbennett5626 6 ай бұрын
Only way to go tbh
@markbennett5626
@markbennett5626 6 ай бұрын
Even more powerful once Python in Excel is released to mainstream
@bakasenpaidesu
@bakasenpaidesu 6 ай бұрын
.
@christiancoronado
@christiancoronado 6 ай бұрын
Excel is a fast, simple solution for 90% of people out there. Why overcomplicating things.
@crystalcleargirl07
@crystalcleargirl07 6 ай бұрын
😂 because we have better things to do in life than opening/ importing each file in excel BY HAND where we can automate it
@christiancoronado
@christiancoronado 6 ай бұрын
Well i don't know what you do for a living, I am a CPA working for a large hospital in CA. And we only used Excel@@crystalcleargirl07
@christiancoronado
@christiancoronado 6 ай бұрын
@crystalcleargirl07 well I don't know what you do for a living. I am a CPA working for a large hospital in CA, and we only used Excel. What important job do you do that requires you to use Python
@kexec.
@kexec. 6 ай бұрын
if you know python, it is way easier than handling excel gimmicks like VBA. I'm speaking it with my experience.
@christiancoronado
@christiancoronado 6 ай бұрын
i get it, but i've been doing this for a living for the last 15 years, and I know both VBA and Python and it's just impractical to go for Python in 95% of cases. Also, PowerQuery can go above and beyond the excel row threshold and accomplish the same thing that was done here@@kexec.
The most important Python script I ever wrote
19:58
John Watson Rooney
Рет қаралды 187 М.
Python In Excel: Microsoft Changed EVERYTHING
14:37
Luke Barousse
Рет қаралды 447 М.
Schoolboy Runaway в реальной жизни🤣@onLI_gAmeS
00:31
МишАня
Рет қаралды 4 МЛН
Yum 😋 cotton candy 🍭
00:18
Nadir Show
Рет қаралды 7 МЛН
If Barbie came to life! 💝
00:37
Meow-some! Reacts
Рет қаралды 78 МЛН
艾莎撒娇得到王子的原谅#艾莎
00:24
在逃的公主
Рет қаралды 54 МЛН
5 Good Python Habits
17:35
Indently
Рет қаралды 507 М.
Cleaning up 1000 Scraped Products with Polars
15:30
John Watson Rooney
Рет қаралды 5 М.
I've Read Over 100 Books on Python. Here are the Top 3
9:26
Python Programmer
Рет қаралды 342 М.
Why I chose Python & Polars for Data Analysis
24:33
John Watson Rooney
Рет қаралды 6 М.
10 Python Comprehensions You SHOULD Be Using
21:35
Tech With Tim
Рет қаралды 142 М.
Are You Still Using Excel? AUTOMATE it with PYTHON
7:19
John Watson Rooney
Рет қаралды 48 М.
How I Scrape 7k Products with Python (code along)
27:26
John Watson Rooney
Рет қаралды 9 М.
Python in Excel vs. VBA - What You Should Learn in 2024!
10:05
David Langer
Рет қаралды 39 М.
STOP using Spreadsheets for Everything!
10:39
Luke Barousse
Рет қаралды 146 М.
5 Amazing Ways to Automate Your Life using Python
18:40
Internet Made Coder
Рет қаралды 244 М.
Schoolboy Runaway в реальной жизни🤣@onLI_gAmeS
00:31
МишАня
Рет қаралды 4 МЛН