Из-за периодической блокировки нашего сайта РКН сервисами, просим воспользоваться резервным адресом:
Загрузить через dTub.ru Загрузить через ClipSaver.ruУ нас вы можете посмотреть бесплатно How to find integer index of a string in a column in pandas dataframe? или скачать в максимальном доступном качестве, которое было загружено на ютуб. Для скачивания выберите вариант из формы ниже:
Роботам не доступно скачивание файлов. Если вы считаете что это ошибочное сообщение - попробуйте зайти на сайт через браузер google chrome или mozilla firefox. Если сообщение не исчезает - напишите о проблеме в обратную связь. Спасибо.
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса savevideohd.ru
Hello everyone! I hope this video has helped solve your questions and issues. This video is shared because a solution has been found for the question/problem. I create videos for questions that have solutions. If you have any other issues, feel free to reach out to me on Instagram: / ky.emrah Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!How to find integer index of a string in a column in pandas dataframe? I am importing a csv file in pandas containing data like this. Referring to following code, I want to get integer index of row containing name_to_search in column name in df1. name_to_search name df1 name, ColB, ColC, ColD P1, 1,1,1 P2, 0,1,0 P3, 1,1,0 ... df1 = pd.read_csv(filepath_or_buffer='file.csv', header=[0]) df1['name'].str.lower() name_to_search = 'p1' row_indx1 = df1.index.get_loc(df1[df1['name'] == name_to_search].index[0]) # error line name, ColB, ColC, ColD P1, 1,1,1 P2, 0,1,0 P3, 1,1,0 ... df1 = pd.read_csv(filepath_or_buffer='file.csv', header=[0]) df1['name'].str.lower() name_to_search = 'p1' row_indx1 = df1.index.get_loc(df1[df1['name'] == name_to_search].index[0]) # error line However, I am getting error IndexError: index 0 is out of bounds for axis 0 with size 0 in error line row. Any idea how to fix? IndexError: index 0 is out of bounds for axis 0 with size 0 error line Tags: python,pandas,string,dataframeSource of the question: https://stackoverflow.com/questions/7... Question and source license information: https://meta.stackexchange.com/help/l... https://stackoverflow.com/