'How to get the last element in a particular row from a df on Python without using column names nor loops? Pandas related
If I have a df like this one down below:
0 0 1 1 2 2 3 3 4 4 5 5
0 Fondo Oceano Cuerpo Cuerpo cangrejo Ojos Antenas Color Amarillo Pinzas None Puas None
1 Fondo Oceano Cuerpo Cuerpo cangrejo Ojos Antenas Color Amarillo Pinzas None Puas Arena
2 Fondo Oceano Cuerpo Cuerpo cangrejo Ojos Antenas Color Amarillo Pinzas None Puas Marron
3 Fondo Oceano Cuerpo Cuerpo cangrejo Ojos Antenas Color Amarillo Pinzas None Puas Purpura
How can I get the last element from a row like 0 without having to iterate over the row nor using the name of the last columns (5 in this case)?
Expected Output for the row 0:
None
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
