The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

642560 (2) [Avatar] Offline
#1
I guess in this example ViolationColumnNames should be turned into a list before passing it to the drop method:

>>> violationColumnNames = filter(lambda columnName: 'Violation' in columnName, nyc_data_raw.columns)
 
>>> with ProgressBar():
>>>     nyc_data_raw.drop(violationColumnNames, axis=1).head() 

should be:
ViolationColumnNames = list(filter(lambda columnName: 'Violation' in columnName, nyc_data_raw.columns))
Shuyib (21) [Avatar] Offline
#2
Hi,

that's true -- check out the Jesse's last post here https://forums.manning.com/posts/list/45185.page.