What do I need to know about the pandas index? (Part 1)

  Рет қаралды 134,667

Data School

Data School

Күн бұрын

Пікірлер
@RikkaTravelAdvisor
@RikkaTravelAdvisor 4 жыл бұрын
You are so articulate and never give me a headache like most of the others
@akashpoudel571
@akashpoudel571 5 жыл бұрын
i dont understand who is that super human who dislikes your videos Sir.....i thinnk we are blessed u are giving your time to teach
@dataschool
@dataschool 5 жыл бұрын
Thanks very much for your kind words! 😊
@adventuresunlimited4483
@adventuresunlimited4483 6 жыл бұрын
I really appreciate the hard work you put in in your videos. I am taking a class in Python and your videos really helped me develop a finer understanding of what is being taught in my classes. These are the best videos for Pandas, I totally love them. I have subscribed and visit your channel almost everyday and each day I get what I was looking for. All the best to you. Keep up the good work.
@dataschool
@dataschool 6 жыл бұрын
Awesome! Thanks so much for your kind words! :)
@BiranchiNarayanNayak
@BiranchiNarayanNayak 4 жыл бұрын
Data School is the ultimate place to learn about Pandas. Thanks for the excellent tutorials on Pandas.
@nathanzorndorf8214
@nathanzorndorf8214 8 жыл бұрын
Dude your videos are so f&*@n clear, they put the MOOCs I'm in to shame.
@dataschool
@dataschool 8 жыл бұрын
Ha! Thanks so much, I'm glad to hear!
@anabelsa
@anabelsa 7 жыл бұрын
I totally agree with Nathan. I am following a MOOC from Harvard, and I have to come here to understand many things that remain totally obscure (at least for me) there. Thanks so much!!!
@AsadAli-ck6fv
@AsadAli-ck6fv 7 жыл бұрын
I'm following an online data science course - and your material is far clearer - keep up your good work!
@sunilarora1750
@sunilarora1750 4 жыл бұрын
Dude, you have best communication skills among Data Science Coaches
@dataschool
@dataschool 4 жыл бұрын
Thank you!
@nataliaagudelo8635
@nataliaagudelo8635 5 жыл бұрын
I am so glad I found your channel, always very thankful for you and your capacity to share your knowledge with us!
@dataschool
@dataschool 5 жыл бұрын
Thanks, Natalia! :)
@avantikasingh4576
@avantikasingh4576 4 жыл бұрын
Thanks for being so effortless and keeping it to the base level .... it is more understandable!
@slavrine
@slavrine 6 жыл бұрын
It must be python 3, but drink.index shows up differently: RangeIndex(start=0, stop=193, step=1). As for the quality of your presentation, this should be a paid course! You're presenting the material so well! Would love to see you do more python courses - Matplotlib, etc
@dataschool
@dataschool 6 жыл бұрын
The index difference is due to the pandas version. Thanks for your very kind comment! I appreciate it!
@khanyasser
@khanyasser 3 жыл бұрын
wooow so glad I chose this video over others! So thorough and clear! Easy to follow! I was struggling and now my code is working. thank you.
@dataschool
@dataschool 3 жыл бұрын
Glad it helped!
@WanderPalateAdventure
@WanderPalateAdventure 4 жыл бұрын
You made my life easy. I am new to this language word and was struggling to understand the concepts. Your videos just saved me.
@fet1612
@fet1612 4 жыл бұрын
4:31 "Why does the index exist? And there are 3 main reasons." 1) identification 2) selection 3) alignment
@BadriNathJK
@BadriNathJK 8 жыл бұрын
Please do videos on merge concatenate and split of data frames. That would be extremely helpful.
@dataschool
@dataschool 8 жыл бұрын
Thanks for the suggestion!
@rajeshd3574
@rajeshd3574 5 жыл бұрын
@@dataschool Eagerly waiting for this video
@marinajin8797
@marinajin8797 5 жыл бұрын
Best of the best, I can follow you step by step, which makes the learning process so efficient and fun. Thanks a MILL
@dataschool
@dataschool 5 жыл бұрын
Thank you! 😊
@niteshmaruthi8784
@niteshmaruthi8784 4 жыл бұрын
Brilliant- This made the exact function of indexes very clear - I am binge watching these videos now!
@dataschool
@dataschool 4 жыл бұрын
Awesome! 🙌
@sararabiee8610
@sararabiee8610 6 жыл бұрын
You are an amazing teacher. I am new to this field and your videos are great help. Thanks a million 🙏🏽
@dataschool
@dataschool 6 жыл бұрын
You're very welcome! Thanks very much for your kind words! :)
@AhmedHamada-f5e
@AhmedHamada-f5e 3 жыл бұрын
Hello Dear, Respect for the the elegance , respect for the simplicity I am Egyptian arabic speaker with good english competence,I 've started to teach some pandas videos in arabic (learn data analysis from a beginner:), You are my role model , wonder if dataset links here is open source? can i use them in my videos? Regards
@ossenaar
@ossenaar 6 жыл бұрын
Great videos series in pandas. For scalar selections (individual elements) in a large data frame, there is a faster alternative for using loc (labels based) and iloc (integer position based): at and iat.
@dataschool
@dataschool 6 жыл бұрын
I did not know that... thanks for sharing!
@bingochipspass08
@bingochipspass08 4 жыл бұрын
Perfect explanation! Even the documentation doesn't do such a good job!
@dataschool
@dataschool 4 жыл бұрын
Thank you! 🙏
@aqilraza
@aqilraza 8 жыл бұрын
Now I understand how to use set_index(). Excellent way of explaining key concepts.
@dataschool
@dataschool 8 жыл бұрын
I'm glad to hear it was helpful to you!
@tomasfanta9768
@tomasfanta9768 5 жыл бұрын
Nice, clear and very helpful, especially "pd.DataFrame.reset_index" usage, thank you!
@dataschool
@dataschool 5 жыл бұрын
You're very welcome!
@Honest_Reply900
@Honest_Reply900 2 жыл бұрын
Thanks a lot for the detailed explanation. I appreciate you hard work and sharing your knowledge
@dataschool
@dataschool 2 жыл бұрын
Thanks!
@zennologyofeverything7265
@zennologyofeverything7265 6 жыл бұрын
THANK YOU! I just started with python datascience projects. My first project is the famous iris dataset. this helps a lot
@dataschool
@dataschool 6 жыл бұрын
You're very welcome!
@datascienceds7965
@datascienceds7965 6 жыл бұрын
You deserve million subscription. I got an answer that I was looking for ages!!! reseting index to column. You saved my time. Thank you so much. I was wondering if you have done any percentage plotting. Sorry if it is a wrong way of asking !!
@dataschool
@dataschool 6 жыл бұрын
Thanks! I'm not sure what you mean by percentage plotting, sorry!
@datascienceds7965
@datascienceds7965 6 жыл бұрын
No worries. I got answer that I was looking. Thanks for taking time to reply.
@vishalaggarwal8783
@vishalaggarwal8783 7 жыл бұрын
When you are making the Data Visualisation series.Please do that ,it is highly required.
@dataschool
@dataschool 7 жыл бұрын
Thanks for the suggestion! I'm not sure when I'll be creating it.
@aqilraza
@aqilraza 8 жыл бұрын
Excellent! Excellent! Excellent! way of explaining the concept of index - you rock!
@dataschool
@dataschool 8 жыл бұрын
Wow, thank you! :)
@armenlevonian5204
@armenlevonian5204 7 жыл бұрын
Super clear and helpful!! I so agree with others who commented as such. Thank you!!
@dataschool
@dataschool 7 жыл бұрын
You're very welcome! It's exactly the kind of video I wish was available when I was learning pandas, and that's why I made it :)
@leonardoferigutti9039
@leonardoferigutti9039 4 жыл бұрын
Excelent job!! It's amazing the quality of your job!! Thanks
@dataschool
@dataschool 4 жыл бұрын
Thank you very much!
@susansilver1334
@susansilver1334 6 жыл бұрын
Very clear. So good. Subscribed! I will gladly give you my time. You are a good teacher.
@dataschool
@dataschool 6 жыл бұрын
Awesome, thanks!
@TadeuszKurpiel
@TadeuszKurpiel Жыл бұрын
time 11:10 - resetting the index IS POSSIBLE even when the index does not have the name - in that case the column created from index will be named 'level_0' - at least it works that way in pandas ver.2.0.3
@dataschool
@dataschool Жыл бұрын
Got it, thanks for letting me know!
@sep69
@sep69 6 жыл бұрын
Thanks so for this video. It made me understand something I was struggling with. I'm going to watch you other video's right away :)
@dataschool
@dataschool 6 жыл бұрын
Awesome! Great to hear :)
@farooq36901
@farooq36901 2 жыл бұрын
You are a fantastic teacher.
@dataschool
@dataschool 2 жыл бұрын
Thank you!
@christat13
@christat13 7 жыл бұрын
Many, many thanks for all of your awesome videos. Super helpful, quick and easy to follow! Wish I found your site sooner, it would have saved me a lot of aggravation!
@dataschool
@dataschool 7 жыл бұрын
You're very welcome! Thanks for your kind words :)
@dulangikanchana8237
@dulangikanchana8237 5 жыл бұрын
Hello awesome videos, can you kindly make some videos for numpy, and sklearn libraries, and k-means clustering, and supervised learning algorithms,R, and maybe Tensor Flow you are one of the best data science teachers at KZbin, Best of Luck, don't stop making videos.
@dataschool
@dataschool 4 жыл бұрын
Here are my scikit-learn videos: kzbin.info/aero/PL5-da3qGB5ICeMbQuqbbCOQWcS6OYBr5A
@nabazgharib
@nabazgharib 8 жыл бұрын
Thank you for your videos. You are amazingly explaining the commands in pandas, this is what I was looking for. I hope you give a tutor on datetime datatype, and how to parse string to datetime and vice versa in pandas. and how to create a time series.
@dataschool
@dataschool 8 жыл бұрын
Thank you so much for your kind words! I have a video coming out on July 19 discussing the datetime format... I'll let you know when it comes out!
@dataschool
@dataschool 8 жыл бұрын
My video on the datetime format has been released, and should be helpful to you! kzbin.info/www/bejne/r3TKe3qpnJWLl5Y
@akramsystems
@akramsystems 6 жыл бұрын
reset_index() exactly what I was looking for to make a new set of indices in order of your current DataFrame :D thanks!
@dataschool
@dataschool 6 жыл бұрын
You're welcome!
@rvma77
@rvma77 7 жыл бұрын
Your videos are great! Thank you for sharing your knowledge.
@dataschool
@dataschool 7 жыл бұрын
Thanks so much!
@albertteplitsky7629
@albertteplitsky7629 6 жыл бұрын
Hello Kevin, I love your videos and they have helped me improve my programming skills to an entirely new level. I was wondering if you would be able to provide links or availability on how to access more complicated science-based data-sets because often the hardest thing to do is just find data sets with the necessary complexity to practice on. Continue the good work!!!
@dataschool
@dataschool 6 жыл бұрын
Glad I have been helpful! Regarding datasets for practice, I like this source: www.kaggle.com/datasets
@albertteplitsky7629
@albertteplitsky7629 6 жыл бұрын
Data School thank you very much Kevin!! I greatly appreciate this I will be doing some fun projects with these 👍
@dataschool
@dataschool 6 жыл бұрын
You are very welcome! :)
@asneogy
@asneogy 8 жыл бұрын
Hey Kevin! I think it would be important to emphasize here, when you converted the country to an Index, that the values in the index need to be unique (primary keys). Otherwise (does it give an error?) it totally ruins the purpose of identification / selection / alignment / merging. That way you could also reconnect to the unique() and nunique() methods as pre-requisites before setting the index. Awesome video as always.
@dataschool
@dataschool 8 жыл бұрын
Actually, index values do not need to be unique! In fact, there may be cases in which you desire a non-unique index, and you can still use it for identification etc.
@asneogy
@asneogy 8 жыл бұрын
thats very interesting! could you give an example where that would be useful?
@dataschool
@dataschool 8 жыл бұрын
Sure. Imagine a dataset of web server logs. Perhaps you want to use the IP address of the requesting computer as the index, in order to make it most convenient to filter the dataset by IP address. Or perhaps you want to use the datetime of requests as the index, even though it's possible for multiple requests to come in at the same time.
@LiveCustoms
@LiveCustoms 4 жыл бұрын
How do you get values in the data frame when the index values are always changing? I.e every time I update my csv file the dates will be updated?
@peterfrantz477
@peterfrantz477 Жыл бұрын
What a great tutorial!
@dataschool
@dataschool Жыл бұрын
Thank you!
@ganxe
@ganxe 8 жыл бұрын
Very nice, very clear, thank you bro. I subscribe!
@dataschool
@dataschool 8 жыл бұрын
Thanks for subscribing!
@zes7215
@zes7215 6 жыл бұрын
no such thing as cx or nx or not, any can be perfx
@vipinmadathil
@vipinmadathil 4 жыл бұрын
Can you post a video on creating dataframe from dictionaries nested at multiple levels
@waela3637
@waela3637 4 жыл бұрын
thank you, I was stuck how to change the header of my dataset
@dataschool
@dataschool 4 жыл бұрын
You're welcome!
@danielebaldoni2181
@danielebaldoni2181 3 жыл бұрын
Thank you for the great work. How coukd do if i have an array (suppose the score of a pca with 3 components) and i would select just the index of the elememts who respect a certain condition?
@reshaknarayan3944
@reshaknarayan3944 6 жыл бұрын
Excellent bro! Keep up the good work.
@dataschool
@dataschool 6 жыл бұрын
Thanks!
@mahmudhasanmunna9314
@mahmudhasanmunna9314 3 жыл бұрын
your video help me a lot. thank you
@dataschool
@dataschool 3 жыл бұрын
You're very welcome!
@christopherlyons7613
@christopherlyons7613 4 жыл бұрын
Thanks for the vids. What if I want to use a column as an index (like country) but I also want it to be a column in the dataset so the values can be accessed using standard access techniques (i.e. df[column], df.column, getting subsets of the data with [:], data use with .loc & .iloc, etc.). Is there a way to tell pandas to use a column as an index AND leave it as a column? Or would you have to copy the column to a new name to keep the data acessible?
@dataschool
@dataschool 4 жыл бұрын
Great question! A column of data is either a column (in the DataFrame) or its the index, but not both. Definitely don't make a copy and include it twice. It sounds to me like you should leave it in the DataFrame as a column... is there a particular reason that you need it to be the index?
@Andorich77
@Andorich77 4 жыл бұрын
Let’s say you have column headers that contain dates and the actual data frame rows contains values specific to each date and you wish to plot each value for each date. Ultimately creating a line graph from all the values. X axis being the dates and y axis being the values. How would approach this. I’ve looked at variety of your videos but can’t seem to find a definite way of doing this.
@dataschool
@dataschool 4 жыл бұрын
Sorry, it's hard for me to understand precisely what you are trying to do... good luck!
@PankajKumar-ot3mg
@PankajKumar-ot3mg Жыл бұрын
super amazing teacher
@dataschool
@dataschool Жыл бұрын
Thanks so much!
@karimmanseri8619
@karimmanseri8619 4 жыл бұрын
Hi, Thanks for your videos, Could you make a video how to sort values from two different data frames, then store them in new data frames. For example data frame 1 has 2 columns name of product and column 2 the country where is made data frame 2 has two columns which are as well product and country, but in this second data frame we will include similar few similar products and country as first data frame. could you write a script to iterate through dataframe 1 and 2 then find the identical product , then append it to data frame 3 along with country column. Thank you
@husseinshuriye6380
@husseinshuriye6380 6 жыл бұрын
Excellent Explanations, Thank bro
@dataschool
@dataschool 6 жыл бұрын
You're welcome!
@imapublicagent
@imapublicagent 6 жыл бұрын
Great video, but I don't think you fully answered the question. The user specifically asked about multi-indexing. Is there any advantage to including "continent" as an additional index? More than one index seems to add confusion.
@dataschool
@dataschool 6 жыл бұрын
You're right, I chose not to cover MultiIndexes in order to limit the scope of the video. The short answer is that how you choose what to use as an index depends on how you expect to use the DataFrame. Most of the time, one index is best.
@dataschool
@dataschool 6 жыл бұрын
You might be interested in my new video about the pandas MultiIndex: kzbin.info/www/bejne/qpS1eJRoqNSWY8U
@nagarjunanaidupayyavula4256
@nagarjunanaidupayyavula4256 6 жыл бұрын
Great stuff Dude...where can I get your's full vedios on python programming?
@dataschool
@dataschool 6 жыл бұрын
I don't have a video series on basic Python programming - is that what you are looking for?
@lukeemrose
@lukeemrose 7 жыл бұрын
Great videos mate! Keep up the good work
@dataschool
@dataschool 7 жыл бұрын
Thanks! :)
@vikaskulshreshtha
@vikaskulshreshtha 4 жыл бұрын
Can you please tell me how to convert strings into numbers. Word to number system.
@kanokpornpoomsirivilai7018
@kanokpornpoomsirivilai7018 4 жыл бұрын
thanks a lot. very thorough.
@dataschool
@dataschool 4 жыл бұрын
You're welcome!
@amitunemelody5612
@amitunemelody5612 4 жыл бұрын
sir how can i use the default index values(i.e.0,1,2,3,4......) as one my column values. For example: I have columns such as ID, Name,Faculty. And here i want, ID column to be filled with the values of default index values(i.e 0,1,2,3,4.....).Hope for the postive response.
@sanmaymishra204
@sanmaymishra204 5 жыл бұрын
can you share an example of importing nested json (as complicated as you can think of) into a pandas dataframe
@dataschool
@dataschool 5 жыл бұрын
I don't have an example handy, sorry!
@rsiqueir2
@rsiqueir2 5 жыл бұрын
Thank you! Your video helped me so much!!
@dataschool
@dataschool 5 жыл бұрын
Awesome!
@yucelozyazgan
@yucelozyazgan 8 жыл бұрын
Simply life saver videos for new programmers like me! How can i and others like me support you to keep you on this way ? i mean is there any way to make simple supports to you ? ( like tip box )
@dataschool
@dataschool 8 жыл бұрын
Thanks for your kind words, and for your generous offer! On my channel page, there is a blue button on the right side that says "Support", which allows you to make a donation of any size: kzbin.info Also, I have a PayPal link at the bottom of this page: www.dataschool.io/about/ Thanks again! :)
@nimesharya909
@nimesharya909 8 жыл бұрын
amazing, best explantion. do u have tutorials for video analytics, machine learning, tableau
@dataschool
@dataschool 8 жыл бұрын
Thanks! Here's my video series on machine learning with scikit-learn: kzbin.info/aero/PL5-da3qGB5ICeMbQuqbbCOQWcS6OYBr5A
@baixartv
@baixartv 6 жыл бұрын
Hello from Brazil :)
@dataschool
@dataschool 6 жыл бұрын
Hello from the USA! :)
@rachellelancer3577
@rachellelancer3577 7 жыл бұрын
Super helpful. Thanks so much
@dataschool
@dataschool 7 жыл бұрын
You're welcome!
@redcat7467
@redcat7467 4 жыл бұрын
The tip is amazing.
@dataschool
@dataschool 4 жыл бұрын
Thanks!
@Druzian
@Druzian 3 жыл бұрын
How you can found the index number of a row?
@fizzakhan9497
@fizzakhan9497 4 жыл бұрын
Sir kindly tell me [corrmat=dataset.corr() top_corr_features=corrmat.index] What does .index function works and how this code working
@hardikvegad3508
@hardikvegad3508 4 жыл бұрын
Sir if we have hundreds of columns without the name. Then how can we name them using pandas and a for loop or lambda function because if we try to name them using names=[] it will be a very time-consuming process. The name of the columns can be col1, col2 , col3...etc.
@adritaanwar2279
@adritaanwar2279 4 жыл бұрын
If I have a 3000×563 raw dataset without any column names and a list of 563 features. How can I name my columns using dataframe?
@peterabdou6169
@peterabdou6169 7 жыл бұрын
is it a must to make sure that pandas index has unique values?
@dataschool
@dataschool 7 жыл бұрын
Actually, the pandas index doesn't have to use unique values.
@ramakanthrayanchi8888
@ramakanthrayanchi8888 8 жыл бұрын
Excellent video !! Cheers
@dataschool
@dataschool 8 жыл бұрын
Thanks!
@chengqian4350
@chengqian4350 5 жыл бұрын
good vedio! just one suggestion. either remove the subtitle or make the code above the subtitle.
@dataschool
@dataschool 5 жыл бұрын
Thanks for your suggestion!
@kadiryasar2225
@kadiryasar2225 7 жыл бұрын
Hi, thank you so much for this very informative video series. My question is: suppose that we re-index the dataframe but the new index column contains same values for some rows. I tried and pandas allowed to do it, but it does not make sense for me. If smthng is index for my data, it shall be unique. Thanks.
@dataschool
@dataschool 7 жыл бұрын
It is true that pandas does not require that the index is unique. I realize that might not make sense if you are using to using the index as a unique identifier. But in pandas, the index is just supposed to be an identifier, and the user can decide if they want it to be unique. In other words, pandas is providing the user with flexibility. Hope that explanation helps!
@_proton5
@_proton5 3 жыл бұрын
Silly question: How do I get the neat separation black lines in my table of the df? I only get one line below the column headers.
@dataschool
@dataschool 3 жыл бұрын
Depends on the version of Jupyter Notebook
@haisonduong4726
@haisonduong4726 7 жыл бұрын
@,@ The Jupyter Notebook lesson is excellent. They're free and better than my not-free books. @,@
@dataschool
@dataschool 7 жыл бұрын
Thanks so much for your kind comment!
@saradag6939
@saradag6939 4 жыл бұрын
Hlo... Sr. How to convert rows into colomns nd colomns into rows in dataset
@mohammedsakaria5324
@mohammedsakaria5324 8 жыл бұрын
Hello, Why is it that when I try to make 'continent' as the index, it gives me the KeyError?
@dataschool
@dataschool 8 жыл бұрын
What code did you write that generated the error? This should work just fine: drinks.set_index('continent') Let me know!
@acezhang2414
@acezhang2414 7 жыл бұрын
Maybe you have already run it before without attention, and when you run it again consciously, it gives the KeyError.
@bsemailaccount615
@bsemailaccount615 6 жыл бұрын
HI, I have a question please: what is the difference between using delimiter and sep? Are they interchangeable? Thank you.
@dataschool
@dataschool 6 жыл бұрын
They are equivalent.
@ASNPersonal
@ASNPersonal 4 жыл бұрын
Am getting output like below: drinks.index RangeIndex(start=0, stop=193, step=1) how to get like your output?
@diegrootam
@diegrootam 6 жыл бұрын
Hello from Brazil 8:56 :D
@dataschool
@dataschool 6 жыл бұрын
Hello to you as well!
@dawjid6092
@dawjid6092 5 жыл бұрын
Thanks for your video its really help, please i want to divide a huge data-set base on date snapshot for time-series neural network
@dataschool
@dataschool 5 жыл бұрын
I won't be able to help... good luck!
@ASNPersonal
@ASNPersonal 4 жыл бұрын
Have a question, drinks.head( ) getting nice table format but am not getting. How to get with table?
@brendafosmire6519
@brendafosmire6519 4 жыл бұрын
What happens when the column you set as the index has >1 instance of that value? Like what if there was more than one row for Country?
@dataschool
@dataschool 4 жыл бұрын
The pandas index does not have to be unique. Does that help?
@sivakavin2872
@sivakavin2872 3 жыл бұрын
Addicted to your way of teaching brother #kevin
@dataschool
@dataschool 3 жыл бұрын
Thank you! 🙏
@MagnusAnand
@MagnusAnand 3 жыл бұрын
Great video
@dataschool
@dataschool 3 жыл бұрын
Thanks!
@Martin-dw4eo
@Martin-dw4eo 3 жыл бұрын
Thank you!
@dataschool
@dataschool 3 жыл бұрын
You're welcome!
@karthikudupa5475
@karthikudupa5475 6 жыл бұрын
you are awesome bro!!
@dataschool
@dataschool 6 жыл бұрын
Thanks!
@pratimtalukdar618
@pratimtalukdar618 6 жыл бұрын
why do the drinks.columns return the column names appended with the character 'u'?
@dataschool
@dataschool 6 жыл бұрын
That indicates a Unicode string in Python 2.
@DavitBarbakadze
@DavitBarbakadze 7 жыл бұрын
Are you on Patreon? I'd personally pledge for such detailed explanations :)
@dataschool
@dataschool 7 жыл бұрын
Thanks so much for offering! No, I'm not currently on Patreon, though I will consider it for the future! However, I'd love it if you would join my email newsletter: www.dataschool.io/subscribe/
@dataschool
@dataschool 6 жыл бұрын
Hi Davit, I finally launched a Patreon campaign! I would love your support! www.patreon.com/dataschool/overview
@NipunRawat08
@NipunRawat08 2 жыл бұрын
How do I learn all these methods man they are so many and really hard to remember
@dataschool
@dataschool 2 жыл бұрын
Practice, practice, practice! 😄
@DimasAnggaFM
@DimasAnggaFM 6 жыл бұрын
this video is great great!!
@dataschool
@dataschool 6 жыл бұрын
Thanks!
@Theasifaliamiri
@Theasifaliamiri 6 жыл бұрын
How do I compare a mean value for two values in a column, for example, check if the mean value of 'beer servings' for Europe and Asia are same or not?
@dataschool
@dataschool 6 жыл бұрын
I'm not sure I understand your question - Are you asking how to write an equality statement?
@Theasifaliamiri
@Theasifaliamiri 6 жыл бұрын
Data School sir thank you for replying. Now I got the answer from one of your other videos. Love from Pakistan.
@dataschool
@dataschool 6 жыл бұрын
Great to hear!
@sayakpaul3152
@sayakpaul3152 7 жыл бұрын
Could you explain ix operator?
@dataschool
@dataschool 7 жыл бұрын
I discuss it in this video: kzbin.info/www/bejne/rqfTf3Rtl6hrmdU Hope that helps!
@sayakpaul3152
@sayakpaul3152 7 жыл бұрын
Extremely sorry I commented without watching. Thanks.
@dataschool
@dataschool 6 жыл бұрын
Since you asked previously about ix, I just wanted to let you know that it has been deprecated... which I discuss in my newest video: kzbin.info/www/bejne/qpaYe6WJeLxggrs Enjoy!
@s2kcolin780
@s2kcolin780 5 жыл бұрын
thank you
@dataschool
@dataschool 5 жыл бұрын
You're welcome!
@KimmoHintikka
@KimmoHintikka 7 жыл бұрын
drinks.index is giving me a different output. Is this a change in Pandas? I get > drinks.index Out[2]: RangeIndex(start=0, stop=193, step=1)
@KimmoHintikka
@KimmoHintikka 7 жыл бұрын
Btw. Really great pandas series. Lot of topics really clearly explained.
@dataschool
@dataschool 7 жыл бұрын
Yes, RangeIndex was introduced in pandas 0.18: pandas.pydata.org/pandas-docs/stable/whatsnew.html#whatsnew-0180-enhancements-rangeindex Glad you like the series!
@patelhastik7887
@patelhastik7887 6 жыл бұрын
hello, how can I fetch column name and column index form excel table using panda package??
@dataschool
@dataschool 6 жыл бұрын
This should help: pandas.pydata.org/pandas-docs/stable/generated/pandas.read_excel.html
@yucelozyazgan
@yucelozyazgan 8 жыл бұрын
question : iloc and ix produce full-NaN rows when they have values are out of the index of the data frame. what should i do to prevent this misleading empty rows ? ex : 1 - drinks.set_index('country').ix['Afghanistan'] # as expected --> the row of afghanistan 2- drinks.set_index('country').ix['x'] # as expected --> a key error 3- drinks.set_index('country').ix[ ['Afghanistan', 'x'] ] # unexpectedly Afg. + full-NaN row
@yucelozyazgan
@yucelozyazgan 8 жыл бұрын
isn't it really weird ? :(
@dataschool
@dataschool 8 жыл бұрын
It's not clear to me whether this is the "right" or "wrong" behavior - it just is. So, I guess the solution is to just avoid passing values that are not in the index! :)
@yucelozyazgan
@yucelozyazgan 8 жыл бұрын
:) it's just miss leading if you are looking for just the amount of records :D it took little time to realize this feature and want to share it. As you said, i must use if condition to check whether any of your element in the index or not. i'm trying to gain experience with simple course like udacity - intro to data analysis(free). however, it takes much more time if you do not have any assist, anyone to ask your questions .. i'm not sure when i'm ready for your any courses .. i wish to work with you .. did i miss the bus ?
@dataschool
@dataschool 8 жыл бұрын
I have a course on Machine Learning with Text in Python: www.dataschool.io/learn/ The Master Course started last week, but it's not too late to join! I'll also be announcing new courses in the future to my newsletter subscribers: www.dataschool.io/subscribe/
@jainamshah28
@jainamshah28 5 жыл бұрын
"boolean arrays use the same shortcut as slices to select along the index axis" can you please justify what the above statement means?
@dataschool
@dataschool 4 жыл бұрын
I don't remember that particular sentence, sorry!
@biddyasdiddy
@biddyasdiddy 6 жыл бұрын
Could someone explain the difference between having the duplicate index values vs. unique index values (as has been mentioned in the video, we can replace the index with any column which means that we can set the index value with column that has duplicates)?
@dataschool
@dataschool 6 жыл бұрын
I'm not sure I understand your question. Maybe you could clarify what you would like to know? Thanks!
@biddyasdiddy
@biddyasdiddy 6 жыл бұрын
Thank you for the reply, I tried to set one column with duplicates from dataframe as its index. Since we have duplicated values as an index, how would that affect slicing and selecting? I understand that in general, when searching for rows with index, it might return two rows that have the same index, except that what are the disadvantages of having duplicate indexes?
@dataschool
@dataschool 6 жыл бұрын
I think that is the main disadvantage.
@FabioRBelotto
@FabioRBelotto 2 жыл бұрын
Can I have a non unique values for index? What would happen?
@dataschool
@dataschool 2 жыл бұрын
Great question! That's usually not what you want to do, but a non-unique index is currently allowed.
What do I need to know about the pandas index? (Part 2)
10:38
Data School
Рет қаралды 68 М.
How do I select multiple rows and columns from a pandas DataFrame?
21:47
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 28 МЛН
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 1,8 МЛН
P. J. E. Peebles, "The Whole Truth: A Cosmologist’s Reflections on the Search for Objective Reality"
58:07
Harvard Science Book Talks and Research Lectures
Рет қаралды 87
How do I handle missing values in pandas?
14:28
Data School
Рет қаралды 197 М.
How do I make my pandas DataFrame smaller and faster?
19:06
Data School
Рет қаралды 67 М.
When should I use the "inplace" parameter in pandas?
10:19
Data School
Рет қаралды 54 М.
How do I use the MultiIndex in pandas?
25:01
Data School
Рет қаралды 175 М.
How do I avoid a SettingWithCopyWarning in pandas?
13:30
Data School
Рет қаралды 44 М.
How do I filter rows of a pandas DataFrame by column value?
13:45
Data School
Рет қаралды 280 М.
How do I explore a pandas Series?
9:51
Data School
Рет қаралды 75 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 28 МЛН