Re: [BangPypers] Python List Comprehension Question

2014-10-03 Thread Bhargav Kowshik
We could use what Anand talked about at Pycon India about handling the headers in first row of a CSV.In this scenario, instead of default for result being None and checking if None everytime, we could have the default value an empty list. def flat_it(values, result=list()):     for v in values:

Re: [BangPypers] Python List Comprehension Question

2014-10-03 Thread Bhargav Kowshik
[3, 7]], 4] Output 1: [1, 2, 3, 7, 4] Output 2: [1, 2, 3, 7, 4, 1, 2, 3, 7, 4] Output 3: [1, 2, 3, 7, 4] Thank you, Bhargav. On Friday, October 3, 2014 8:48 PM, Anand Chitipothu wrote: On Fri, Oct 3, 2014 at 8:26 PM, Bhargav Kowshik wrote: We could use what Anand talked ab

Re: [BangPypers] Python List Comprehension Question

2014-10-03 Thread Bhargav Kowshik
r ramaraju wrote: On Fri, Oct 3, 2014 at 9:04 PM, Bhargav Kowshik wrote: Nice! Thank you very much Anand.But, I still don't know what is happening.Please point me to a resource to understand what is happening. A common beginner mistake. More of such gotcha can be found here  htt

Re: [BangPypers] Resource for ML

2017-06-06 Thread Bhargav Kowshik
Hey Ramkrishna, I have found the following book very useful. - https://github.com/jakevdp/PythonDataScienceHandbook Thank you, Bhargav On Tue, Jun 6, 2017 at 8:59 PM, Ramkrishna P wrote: > Hello Team, > I have started out to work on pandas and numpy libraries to pick some > machine learning co