Set Index and Reset Index in Pandas
Автор: AtmaKumar Rai
Загружено: 2023-01-05
Просмотров: 285
Описание:
#pandas
#Set_Index_and_Reset_Index_in_Pandas
Using set index we can set any column to index and using reset we can again reset Index
#code
https://github.com/AtmaKumar/Pandas/b...
data
https://github.com/AtmaKumar/Pandas/b...
1. data.head()
To get top 5 Rows of the given data file(by default)
2. data.tail()
To get last 5 Rows of the given data file(by default)
3. data.head(10)
To get last 10 Rows of the given data file
4. data.tail(10)
To get last 10 Rows of the given data file
5. data.drop(‘coloum name’,axis=1,inplace=True)
To delete any particular coloum from the data file
6. data.drop(index number,inplace=True)
To delete any raw(index number) from the data file
7. data.set_index(‘coloum name’,inplace=True)
To set any particular coloum as index in a data file
8. data.reset_index(inplace=True)
To reset the index in data file
9. data.loc[x:y]
To only show data of given index number from the data file
• Here x,y are the index number
• “Data.loc” always apply on index number
10. Data.iloc[x:y,a:b]
To only show data of given row and coloum from the data file
• x,y is Starting and Ending number of raw.
• a,b is Starting and Ending number of coloum.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: