У нас вы можете посмотреть бесплатно Selecting items | #48 of 53: The Complete Pandas Course или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
This Trick is very useful in Pandas in selecting the element using both location and position. Let's See how useful is this Trick 🔹 Tips and Tricks Selecting Element using both Position and Label in Python Pandas. Whereas if you use df dot ILOG, you need to give the row and the column locations. Now there could be a situation where you are going to use either of these either df dot log or do dot ilok. And inside this, you need to pass a mixture of a label and a position. If it is df dot log, both of these should be labels. If it is df dot ilok, both of these should be positions. But you might end up in a situation where you cannot hard code certain values. So you have to use a combination of both label and a position. How can you do that there is a small workaround for this that you can do. Let's see that was an example based on the Titanic data set. From this data set, we want to get the name of this person, this value is present over here, right in this data frame, we want to extract this value using either df dot lock or a lock. But using a mixture of both label and position. Can you imagine how you would do that. So let's see that with an example. Say we are going to use lock. In this one we cannot hard code the column name, we know the column position, we know the column position and index is one index value equal to one column position is two. If this is the case, pass the index asset is value equal to one and pass in the position to df dot columns. This will return the column name, the output of this is going to be column name, then this output is the name of the person that you want to extract. Whatever is the other way around that is you cannot hard code the index row name, you can use df dot index pass in the row position, this will give you the index value itself, right? Use this and column name. Both of this would work. Let me know in the comments section if you have any questions! If you enjoyed this video, be sure to throw it a like and make sure to subscribe to not miss any future videos! Thanks for watching! #machinelearningplus #python #pandas #datascience