@@CodeWithDerrick Hi Derrick! Thanks for your videos, very helpful! Can you help me with the following problem: I have a csv file with 3 columns: date, expenses, and names of many different customers. I need to find the dates where customers spend more than 1 day before and 1 day after, as well as 1 week before and 1 week after. I think that datetime should help, but I don't know how to apply it in this problem.
@@azamatsergaliyev1856 maybe try something with df[df["date"] == date.today()+X & df["date"] == date. today()-X] so like an conditional statement within your dataframe. Where X is your number 1 day or 7 days (1 week). Not quite sure about the notation for the datetime package right now
Oh my GOSH. this is the one I was looking for a long time, the best video of the month. Thanks for sharing this, very good explanation in very details. I can guarantee farmers or elementary school students also can understand your video, which is to the point, very simple and very clear.
Hey I just wanted to say is that I have been binge watching your videos. In my opinion you have a gift for teaching please continue to make videos you provide tons of value. Thank you for everything!
Thanks to your youtube videos, I am starting to use python for replacing some of my excel work that used to take a lot of time to do but once that script is ready, I can replicate it over and over again with a different project.
Welcome back! Good that you make more Pandas videos ... I refactored your code to include assign method - please do a video on this! import pandas as pd import plotly.express as px df = (pd.read_csv('inputs/monthly_csv.csv') .assign(Date=lambda x: x.Date.apply(pd.to_datetime), buy_price=lambda x: x.Price * .9)) print(df.max(), ' ') print(df.tail(3)) fig = px.line(df, x='Date', y='Price', title='Gold prices over time') fig.show()
Great stuff Derrick, thanks. I was wondering if at some point in this series you could show how how to read in a spreadsheet, filter it, and then write it back out as a spreadsheet but keep the same formatting as the original. I have figured out how to do everything except keeping the original formatting. Thanks.
I have questions if I have a education df which is questions and options if I want to add chapter and topic based on questions how can I automated that task
Thank you Derrick! I've changed job and now I work with data a lot more (all the time actually) and we work with Excel! Even though the data is quite big (couple tousand rows) so I'd love to kind of replace excel with Python while doing that. I know VBA and it helps, but Python would be a much better option for that! looking forward to new videos!
I just found you and realised you hadn't posted for 10 months... 😭 pls come back, I'd gladly take your course if you have one to sell, the way you do things is simply brilliant.
Curious if you have or can show a video from start to finish that includes showing the excel files and how to save+run scripts after it's setup... Bringing the automation full circle ⭕ creation to finished results
I have been trying to read excel file to data frame based on user selecting the file. Tried all options like tkinter, easygui but no luck. Any suggestions or sample code?
thank you Derrick for this video. The only part I had trouble was my figure never loaded in my browser. I researched and made sure javascript was enabled in chrome and still nothing. I saw another method which was writing to html and that worked just fine. Do you know why it won't open via show? Thanks
great intro... I am making the transition to python over the last few weeks. I am struggling to find equivalent functions I often used to manipulate data, such as left(text,4).. is there a resource anywhere that can explain the equivalent python panda code for these kind of functions. (This example is one I am searching for now and was how I came about this video)
I just discovered your videos and looked last night when your last post was and saw it was 6 months ago. Happy you’re back! Can you do a tutorial about how to concatenate data from multiple rows with the same identifier? For example if you have an order ID and sales amount and order type, let’s say Upsell, New, downgrade, etc. if I had 3 rows of data per transaction because a customer purchased 3 products, how could I create a new column that concatenates the order type so I can see if it is a New, Downgrade type of order?
Hai derrick, Please help me If i have value in colum in sheet1, exp: No initial a21-100-103 ss a-100-107 dd b-100 cc And sheet2, i want to lookup value to get initial value from sheet1, Value in sheet 2 , exp No initial a21-102 ?? a107 ?? I can't get using vlookup or index and match, Could you make a code for that cause, please Oh, can i use phyton to access excel file in my pc using jupyter? Thanks a lot a21-103 ??
Hi Derrick! You explain the concepts really well and I love your videos. The Excel series is great. I'm using Spyder instead of Kaggle and wasn't able to to get the plots to show in another window. Not sure what's up. I also copied and pasted your code to see if my code was just funky, but no. Of course I'm updating my Spyder and Anaconda through the Anaconda console while I'm working in Spyder so maybe that's it. Thanks bunches!
Thanks, very useful for me. I have a question: background of the referenced chart? For example if I insert a background photo whose dimensions are known into the graph, I would like to measure the distance between the two points clicked by the mouse. Thanks
Can you teach how to read excel files from a folder where there are bunch of others and just a date or special number are the key to read them. I am sure many people have to read excel files in a daily basis and do some jobs on each. Thank you
Here is an example for you: import pandas as pd df = pd.read_csv("raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv") tips_column = df['tip'] tips_column_as_list = tips_column.to_list() print(tips_column_as_list) I hope it helps!
Her Derrick, you are great ! Thanks for sharing your knowledge. I would appreciate it if you can teach how save the graph in the excel file. Thanks in advance
Can you make video for how to merge data from two columns based on text. For exapmle in first column you have: "20 tablets of 20mg" and in the second: "20 x 20mg". Thank you!
Great video... Everyone else only makes videos with xml files without name spaced data... Can you make a video of how to get data from a XML file with namespace into panda ? without getting the namespace with the objects...
Hey Derrick, thanks for continuing to teach us Excel automation via python. Could you please at some point show us how to make such python Excel automation executable by those who aren’t tech savvy? I just had such a thought because I may need to roll out some of my python automation to my colleagues who don’t have python installed. It would be great for other end users to execute my python files without having to install and configure python on their PCs. Your guidance will be greatly appreciated 👍
it was helpful but we actually need sending auto sms to our phone number after every data entered or every time we sale anything and type it in MS excel.
I'd love to see this as a series, moving into more complex subjects such as pivot tables and solver. Sadly, the latest video of the channel is over 2 years 🤷♂
*For anyone wondering about the benefits of Pandas over excel. Once you have the data in a pandas data frame or series object, you unlock all of the other benefits of Python libraries as well. For example turning charts and graphs into daily PDF reports or sending yourself daily emails of info. The possibilities are endless compared to Excel.
I have a challenge for you...! I have a data frame like the following: A B C APPLES 7 50 ORANGES 5 48 APPLES 4 36 APPLES 3 32 ORANGES 6 47 PEARS 2 26 PEARS 3 26 I want to make a new data frame that only contains a single value for A that has the highest number in B and shows the output C relating to the row identified by having the highest number in B, so the result looks like the following: A B C APPLES 7 50 ORANGES 6 47 PEARS 3 26 How would you tackle this problem?
Finally He remembered TH-cam password
😂😂😂
@@CodeWithDerrick Hi Derrick! Thanks for your videos, very helpful! Can you help me with the following problem: I have a csv file with 3 columns: date, expenses, and names of many different customers. I need to find the dates where customers spend more than 1 day before and 1 day after, as well as 1 week before and 1 week after. I think that datetime should help, but I don't know how to apply it in this problem.
@@azamatsergaliyev1856 maybe try something with
df[df["date"] == date.today()+X & df["date"] == date. today()-X] so like an conditional statement within your dataframe. Where X is your number 1 day or 7 days (1 week).
Not quite sure about the notation for the datetime package right now
no, Python has been missing him
Man your channel deserves to blow up -- to-the-point, organised, clean and genuinely helpful videos. Thank you so much!!
Happy you're back. I'm really in Python and glad to found your videos :)
Oh my GOSH. this is the one I was looking for a long time, the best video of the month. Thanks for sharing this, very good explanation in very details. I can guarantee farmers or elementary school students also can understand your video, which is to the point, very simple and very clear.
Thanks, Derrick! Looking forward to more advanced stuff explained in your usual clear and encouraging way. Great work.
Your short videos teach me more then videos 2 or 3 times as long. Great job...thanks.
My saviour! glad you are back... a 64 years old mini geek
My man! your videos have been helping me understand pandas lib. Glad you're back!
Glad you're back!
He's back! Excited for future advanced techniques from you ;)
You are the man. The content, editing, and your adept teaching ability is exceptional. Thank you.
Man, your explaining is on another level.
Hey I just wanted to say is that I have been binge watching your videos. In my opinion you have a gift for teaching please continue to make videos you provide tons of value. Thank you for everything!
Derek, you legend. What an amazing intro to Pandas 🐼 Thank you so much kind ser! ☺️🙏✨
I'm glad you are back, you are great at what you do!. It made me want to go back and continue to learn. Thanks Derrick
Welcome back!!! Awesome tutorial, Derrick.
GOD, you answered all of my questions in 11 minutes. thank you
Thanks to your youtube videos, I am starting to use python for replacing some of my excel work that used to take a lot of time to do but once that script is ready, I can replicate it over and over again with a different project.
Welcome back! Good that you make more Pandas videos ... I refactored your code to include assign method - please do a video on this!
import pandas as pd
import plotly.express as px
df = (pd.read_csv('inputs/monthly_csv.csv')
.assign(Date=lambda x: x.Date.apply(pd.to_datetime),
buy_price=lambda x: x.Price * .9))
print(df.max(), '
')
print(df.tail(3))
fig = px.line(df, x='Date', y='Price', title='Gold prices over time')
fig.show()
Loved your indepth walk through. Looking forward to another Pandas video 🍻 cheers
Simple, clear to follow; great work.
Thank you Derrick... keep your videos coming!
Great stuff Derrick, thanks.
I was wondering if at some point in this series you could show how how to read in a spreadsheet, filter it, and then write it back out as a spreadsheet but keep the same formatting as the original.
I have figured out how to do everything except keeping the original formatting.
Thanks.
Thanks for your explanations. All where useful to me. Greetings from Spain . ;)
Great work, Derrick! New sub!
Fantastic! Very well explained! Go Go go
I have questions if I have a education df which is questions and options if I want to add chapter and topic based on questions how can I automated that task
Please help me how to manipulate that kind of task
🙄
Thank you Derrick! I've changed job and now I work with data a lot more (all the time actually) and we work with Excel! Even though the data is quite big (couple tousand rows) so I'd love to kind of replace excel with Python while doing that. I know VBA and it helps, but Python would be a much better option for that! looking forward to new videos!
If using excel is necessity use power query...else pandas is best
Your videos are amazing thanks a lot.
Greetings from Spain :)
Can you tell me how to load file who columns keep shifting everday as its created by user manually
I just found you and realised you hadn't posted for 10 months... 😭 pls come back, I'd gladly take your course if you have one to sell, the way you do things is simply brilliant.
The python king is back 🤴👍
These videos have been a big help. Keep them coming. Maybe how to plot various smaller graphs at one html link?
How can i unmerge all the the sheet without choosing specific cells
Curious if you have or can show a video from start to finish that includes showing the excel files and how to save+run scripts after it's setup... Bringing the automation full circle ⭕ creation to finished results
I have been trying to read excel file to data frame based on user selecting the file. Tried all options like tkinter, easygui but no luck. Any suggestions or sample code?
thank you Derrick for this video. The only part I had trouble was my figure never loaded in my browser. I researched and made sure javascript was enabled in chrome and still nothing. I saw another method which was writing to html and that worked just fine. Do you know why it won't open via show? Thanks
Nice vid! Pretty much what I need! Pls keep going!
Awesome Derrick, thank you
How do you reference the excel file from OneDrive? - the syntax I mean.
Great Job Derrick
Was waiting for your video from long time derrick. Could you please upload more on spreadsheet with examples
great intro... I am making the transition to python over the last few weeks. I am struggling to find equivalent functions I often used to manipulate data, such as left(text,4).. is there a resource anywhere that can explain the equivalent python panda code for these kind of functions. (This example is one I am searching for now and was how I came about this video)
Another awesome video...
You make it so simple!
How can you read a specific cell in csv file
More videos please
I just discovered your videos and looked last night when your last post was and saw it was 6 months ago. Happy you’re back! Can you do a tutorial about how to concatenate data from multiple rows with the same identifier? For example if you have an order ID and sales amount and order type, let’s say Upsell, New, downgrade, etc. if I had 3 rows of data per transaction because a customer purchased 3 products, how could I create a new column that concatenates the order type so I can see if it is a New, Downgrade type of order?
Thanks for the request! Just published a video on this case. Hopefully it helps!
@@CodeWithDerrick thanks so much! I can’t wait to check it out!
Could you show us how filter colums by users inputs?
Thanks 👍
Could you please provide simple code for comparing two excels df’s and highlight the difference?
Nice quick example. thanks.
Fantastic presentation, thanks for this!
I try something similar and it says px is not defined.
Hai derrick,
Please help me
If i have value in colum in sheet1, exp:
No initial
a21-100-103 ss
a-100-107 dd
b-100 cc
And sheet2, i want to lookup value to get initial value from sheet1,
Value in sheet 2 , exp
No initial
a21-102 ??
a107 ??
I can't get using vlookup or index and match,
Could you make a code for that cause, please
Oh, can i use phyton to access excel file in my pc using jupyter?
Thanks a lot
a21-103 ??
Hi Derrick! You explain the concepts really well and I love your videos. The Excel series is great. I'm using Spyder instead of Kaggle and wasn't able to to get the plots to show in another window. Not sure what's up. I also copied and pasted your code to see if my code was just funky, but no. Of course I'm updating my Spyder and Anaconda through the Anaconda console while I'm working in Spyder so maybe that's it. Thanks bunches!
Thanks, very useful for me. I have a question: background of the referenced chart?
For example if I insert a background photo whose dimensions are known into the graph, I would like to measure the distance between the two points clicked by the mouse.
Thanks
Can you teach how to read excel files from a folder where there are bunch of others and just a date or special number are the key to read them. I am sure many people have to read excel files in a daily basis and do some jobs on each. Thank you
Please upload more, it’s so good haha
How to add a column into a list in python?
Here is an example for you:
import pandas as pd
df = pd.read_csv("raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv")
tips_column = df['tip']
tips_column_as_list = tips_column.to_list()
print(tips_column_as_list)
I hope it helps!
Please show some small app in GUI like billing system
Great you are back!
Her Derrick, you are great ! Thanks for sharing your knowledge. I would appreciate it if you can teach how save the graph in the excel file. Thanks in advance
Love your tutorials!
Can you make video for how to merge data from two columns based on text. For exapmle in first column you have: "20 tablets of 20mg" and in the second: "20 x 20mg". Thank you!
we miss you king
Thank you Derrick! Are there excel-python resource to dive deep research like pdf, ... ?
Hi sir,,,,,welcome back😊
Great video...
Everyone else only makes videos with xml files without name spaced data...
Can you make a video of how to get data from a XML file with namespace into panda ?
without getting the namespace with the objects...
Hey Derrick, thanks for continuing to teach us Excel automation via python. Could you please at some point show us how to make such python Excel automation executable by those who aren’t tech savvy? I just had such a thought because I may need to roll out some of my python automation to my colleagues who don’t have python installed. It would be great for other end users to execute my python files without having to install and configure python on their PCs. Your guidance will be greatly appreciated 👍
Урааааа.... Деррик снова с нами!!!
ууусука
Please make more videos with Pandas! :)
Your videos are so helpful. Thanks a lot
Simplemente, uno de los mejores. Gracias por tus aportes
great video! thanks derrick.
i just found your channel, great content... can you help with reading an excel file in a document list in sharepoint online using pandas ?
Hey welcome back
tHANX A LOT...starting with pandas
brother you are really doing superb, try using jupyter notebook, it will be great to see instant output !
Really I'm waiting this event
Welcome baaaAAAaack!
Very nice well explained video
Super helpful!
it was helpful but we actually need sending auto sms to our phone number after every data entered or every time we sale anything and type it in MS excel.
Why dont you use Jupyter Notebooks? It's more convenient as you don't have to rerun the whole program.
welcome back
this was so useful.
I'd love to see this as a series, moving into more complex subjects such as pivot tables and solver. Sadly, the latest video of the channel is over 2 years 🤷♂
Thank you!!
awesome as always :-)
Yay, finally 😍
Please give basic courses for beginners in using excel data in python some of the functions are too advanced for beginners
Bro please make tutorial video for spreadsheet App Script
*For anyone wondering about the benefits of Pandas over excel. Once you have the data in a pandas data frame or series object, you unlock all of the other benefits of Python libraries as well. For example turning charts and graphs into daily PDF reports or sending yourself daily emails of info. The possibilities are endless compared to Excel.
Welcome back, but I can't seem to install pandas 😕
long time no see
GREAT.
Where we u man
gives a thumbs up, but there is no subscription to the material; /
Cool!
I knew we all here is ana advanced excel trying to use Python as a bridge to data analytics and big data for automate stuffs.
Finally he hit a pole and remember his account password
I have a challenge for you...! I have a data frame like the following:
A B C
APPLES 7 50
ORANGES 5 48
APPLES 4 36
APPLES 3 32
ORANGES 6 47
PEARS 2 26
PEARS 3 26
I want to make a new data frame that only contains a single value for A that has the highest number in B and shows the output C relating to the row identified by having the highest number in B, so the result looks like the following:
A B C
APPLES 7 50
ORANGES 6 47
PEARS 3 26
How would you tackle this problem?
Here you are :)
import pandas as pd
df = pd.DataFrame(
{
"A": ["Apples", "Oranges", "Apples", "Apples", "Oranges", "Pears", "Pears"],
"B": [7, 5, 4, 3, 6, 2, 3],
"C": [50, 48, 36, 32, 47, 26, 26],
}
)
df_group = df.groupby(by=["A"], as_index=False).max()
print(df_group)
Python rules