Resolved: 2:52 - Error in the indexing
As I was replicating the code above in jupyter, I did not get the message of error with series_b[0]. It gave me the first number as if I had not established an explicit index beforehand. Here's the print screen. Thanks for your help.
sorry, wrong screenshot above. Here it is:
Hi Vania!
Thanks for reaching out!
In this case, calling series_b[0]
should result in a KeyError
because there is no element in the Series with an index of 0.
Please check earlier in your code if you created another Series object with an identical name.
Furthermore, you can try to restart Kernel and re-run only this part of the code (after importing pandas) and see if you still don't obtain an error message after executing series_b[0]
.
Best,
Ivan
Hi Ivan,
The second option you suggested worked. Thanks for your help!
Best, Vânia
You are very welcome!
Best,
Ivan