chendaniely / pandas_for_everyone

Repository to accompany "Pandas for Everyone"
http://a.co/d/c270uul
MIT License
397 stars 406 forks source link

Table 8.4 Incorrect Index Value/Result #16

Open PullMyFork opened 3 years ago

PullMyFork commented 3 years ago

Fifth row from top (as depicted):

"It's just a flesh sound!".find('u') -> Result == 7

Correct:

"It's just a flesh sound!".find('u') -> Result == 6

This may seem minor but newcomers will already be struggling with the zero-reference concept, so this will not be helpful along that journey.

I also am curious about the final line:

"9".zfill(with=5) -> result == '00009'

Having attempted this in both Python 2 and 3, it seems the correct form would simply be:

"9".zfill(5) -> result == '00009'