Re:Analyzing Your Browser History Using Python and Pandas
by rahiel on Monday November 13, 2017 @06:07AM
(#15685639)
These two loops:
can be simplified to a single loop:
Using str.replace here is also non-idiomatic:
How about using str.format instead:
[ Parent
| on HN ]
Re:Analyzing Your Browser History Using Python and Pandas
by hultner on Monday November 13, 2017 @07:03AM
(#15685867)
You could even use the new format strings from Python3.6.
f"Top {topN} Sites Visited"
Re:Analyzing Your Browser History Using Python and Pandas
by applecrazy on Monday November 13, 2017 @09:43AM
(#15686801)
thanks! The code in my post is mainly more of a POC than anything else, but in my next post I’ll try to be more Pythonic.