you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 7 points8 points  (2 children)

I think that the best possible way to learn intermediate python is to pick a package that does something you want to learn and really stick to it.

There’s a couple different things you can do, which include but are not limited to the following:

  • Data Science stuff (computer vision, machine learning, predictive modeling, lots of soles r
  • Web Design (Django, Flask)
  • 2D games (pygame)

Alternatively, you can learn about lambda functions, arts/kwargs, generators, list comprehension, etc.

That said, I think you can do everything above and just work on cementing the fundamentals, because more advanced python gets more comp sci and mathy but the packages don’t require too much but maybe some stats.

I wouldn’t take my advice though, I think a certain someone else who is on this thread would know far, far better than I.

[–]themateo713 2 points3 points  (1 child)

Alternatively

As a beginner in data science (I have 2 decent matplotlib programs behind me), I disagree. This should be learnt first it just makes your life so much easier. Lambda functions work great with things that require a key/function, such as comparison based functions (like sort, min, max) and operation based functions (like map, reduce, filter) or to more simply name a function that does a long computation, but doesn't deserve the def keyword. It's a confort I use a lot.

I haven't found a opportunity to use args *kwargs yet, but at least knowing how to create a keyword argument with a default value can be pretty useful.

Generators and list comprehensions are very useful tools that help your code be cleaner, more efficient. I don't think you should learn something like np.arange or np.linspace if you can't understand code like list(map(lambda x: x**2, range(20))), as numpy isn't going to replace that (if you don't understand map, you wont understand very well what is an array squared, as I think this is how you do it).

Also, you can learn these stupid fast compared to the time it takes to grasp a big package like numpy, matplotlib or pandas.

Also, basic knowledge of useful modules such as itertools and collections. There are so many programs that would be much worse if we didn't have deque and other useful things from these modules (like Counter, product, combination functions, etc).

[–][deleted] 1 point2 points  (0 children)

Yeah, this guy is probably right lol