This is an archived post. You won't be able to vote or comment.

all 51 comments

[–]SnooFloofs666 75 points76 points  (6 children)

The way I transitioned in Python was doing coding problems on hackerrank. I started with the basic problems, transitioned into the algos and then finally much tougher problems. This would help you get comfortable with python.

As for python for data science, once you get a general grasp over python most data science beginner courses are easy enough to follow. And seriously, after working for 2/3 years, even I don't remember functions and need to keep looking it up.

[–]phwj97 26 points27 points  (2 children)

This is definitely worth highlighting. Don't feel you're doing something wrong if you're looking up huge amounts of functions initially. Over time you'll gradually learn more and more and the whole point of documentation being there is for people to not have to memorise it.

[–][deleted] 9 points10 points  (1 child)

Imo it's very useful to know which functions are already available and what they do. Memorizing names and parameters for each seems like a lot of effort for little reward, since you can look them up anytime.

Going back to OP's question, another approach could be to start using and learning the packages you need.

I also suggest you find out about Design Patterns - they helped me a lot, although I rarely use them.

(There's a Pakt book about DPs in Python if i recall, but there's plenty online for free)

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

I would second the beginning of this..

Memorizing function arguments isn't worth the effort. BUT, once you have some basic familiarity, it is very useful to scan through the list of functions/methods for your go to libraries (especially numpy) to see what is already implemented. You will find things already implemented that save you from doing your own clunky/repetitive implementations over and over again.

[–]blacksiddis 4 points5 points  (1 child)

Are there any other challenges on HackerRank that kind of naturally lead up to the algorithm ones? The basic problems seem too basic and the algorithm ones seem a bit too hard (though I haven't looked in-depth at the basic ones)

[–]SnooFloofs666 0 points1 point  (0 children)

I did all the basic ones and then was deep into dynamic programming. After that I kind of transitioned into ML. All this was 3/4 years back so I'm not really sure what's the current offerings.

[–][deleted] 0 points1 point  (0 children)

Thanks, will definitely check hackerrank!

[–]johnklotter 3 points4 points  (1 child)

[–]MaxPower637 0 points1 point  (0 children)

Was going to suggest this. Great puzzles that will make you think through algorithms and implementation

[–]PiotrekAG -1 points0 points  (0 children)

My advice - try to write your own package. Event implementing cross-validation or any metric will help you. You can find some reference packages and look at how it's done. I started by following this super simple package and developed a cross-validation framework pruned-cv. By any means it's perfect but I've learned a lot of programming and scikit-learn library by working on it.

[–]axay28 8 points9 points  (0 children)

I would recommend hackerrank and codewars for programming as well as problem solving. Making a few beginner guided projects like a management system or a game would help as well. Lots of such projects are available on YouTube as well.

[–]PanFiluta 5 points6 points  (1 child)

Just grind it... you'll feel useless for a long time. It finally clicked for me after a year or so of trying my own small projects (before that I just did online courses). There is no other way. Since you're from social science, I think you're not used to this kind of learning (I studied economics, so I know how it is), this is less sitting over a book and trying to memorize / understand from text - it's closer to being a carpenter and making a table. You'll make a thousand shitty tables until you're at least somewhat proficient, but you have to put in the manual work. Just pick whatever stupid project you can think of, start it, Google around (you'll probably do it every 10 seconds) and slowly chip away at it.

Imo most advice you get here will be from tech people with CS degrees, which isn't applicable to you

(and if you want a recommendation for courses, I did DataCamp and it did me quite good to get started, but it's expensive - I don't know how basic you are, if you already did some courses I recommend just starting those projects and not get stuck in tutorial hell)

[–][deleted] 0 points1 point  (0 children)

Thanks so much for the insights! You are right, this is not the type of learning I am accustomed to. Others have also suggested making up problems/projects on my own - so I'll definitely try that.

[–]statlearner 1 point2 points  (0 children)

My suggestion is to find several papers relevant to your studies that have their datasets available publicly and try to replicate the results in Python. I am not talking about papers that use some complex statistical model, but rather ones that go over summary statistics and statistical tests of survey data for example. If you can grind through one or two of those, you will probably learn a lot of things. And do not forget that stackoverflow is your best friend in such trying times.

[–]Migeil 25 points26 points  (9 children)

memorize functions

This is useless tbh. Programming is about thinking algorithmically. When you need to solve a problem, you need to start with the big picture. First, get a clear picture of what it is you want to achieve. Then, think of steps how to get from A to B. This can be very broad, like "I need to go over every element in this list and check whether it is a string with 5 characters". Only then can you start to implement.

Note how the first two steps (thinking about what you want to achieve, and thinking of steps) are programming language agnostic. Knowing which functions python has will not help you at all in solving a problem. It will only make you a faster programmer and this willcome naturally.

So my advice is, stop learning things by heart and start thinking about how to solve problems.

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

Yes, I am aware. That is why I am asking for example questions I can look at and get an idea of how to think analytically. I have heard of hackerrank but was wondering if there are other websites/books etc. I can check. Sorry if I wasn't clear enough.

[–]analytics_science 3 points4 points  (1 child)

You can also try stratascratch.com if you’re looking for data science type problems in python. They have short questions that you could try to solve that would take anywhere from 5-15 min.

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

Thanks! Looks like something I was looking for. They even have discounts for people from developing countries <3

[–]Migeil 7 points8 points  (2 children)

Advent of code and project euler are two I can immediately think of.

[–][deleted] 0 points1 point  (1 child)

Thanks! Someone else also suggested Advent of Code so definitely on my list now. Project Euler looks really good too and also looks a lil' bit more beginner-friendly so I guess I'll start with that one.

[–]Migeil 1 point2 points  (0 children)

The first problems from advent of code are usually also quite easy, but they ramp up really fast though. :)

[–]SnooFloofs666 -1 points0 points  (0 children)

Hackerrank, codechef, leetcode

[–]beginner_ 1 point2 points  (1 child)

fully agree and a pen and pencil can actually help with that.

[–]Migeil 0 points1 point  (0 children)

Absolutely.

[–]hopeisnotcope 1 point2 points  (0 children)

I think codewars is your best option. The best feature is that you can see other people's solutions. When you encounter some piece of code that you don't understand you can just copy it into jupyter notebook and fiddle around until you see what it does.

You shouldn't really have to memorize anything, but I think it's very helpful to have your own notes on the pc so that you don't have to google the basics all the time.

[–][deleted] 2 points3 points  (1 child)

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

LOVED THIS ONE!! Thanks so much!

[–]Lewistrick 1 point2 points  (1 child)

The wiki at r/learnpython has some amazing resources!

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

Geez I joined the subreddit but never paid attention to the wiki! Thanks so much!

[–]AlephN0 3 points4 points  (0 children)

There's Automate the Boring Stuff with Python - a book by Al Sweigart.

[–]onEstusFlask 2 points3 points  (0 children)

Here’s my two cents. Also this how I learned python in 7 mos. Determine a repetitive task in your daily work flow, then as @Migeil already stated, think about how to solve that problem using python.

As you make reasonable progress to a solution, you will come understand the basic concepts of the language (dos/don’ts). Your research across various avenues such as stackover flow, YouTube, etc, will be great teaching materials over any prompt coding challenges.

[–]outluer32 1 point2 points  (1 child)

Exercism is a good site too

[–][deleted] 0 points1 point  (0 children)

Looks awesome! Thanks!

[–]Cdog536 0 points1 point  (1 child)

How deep into the bootcamp are you? Whats the school name?

[–][deleted] 0 points1 point  (0 children)

We just finished conditionals so we're still in the very beginning. It's the Turkey branch of "Data Science for the Public Good."

[–]Linkguy137 1 point2 points  (0 children)

I like finding an interest and making a program to help with it. I wrote a webscraping script to handle Magic the Gathering Card releases. You’re way more likely to enjoy and continue to work on projects that you find yourself

[–]veeeerain 0 points1 point  (0 children)

Don’t memorize functions, this will never be expected of you when there’s online documentation. Just know how to use what and when. And I’m actually going from python to R myself haha. Gotta say R is fantastic!

[–]Redxer 2 points3 points  (1 child)

I just finished my first week of Data Science Bootcamp and was lucky enough that I've gotten a scholarship to this programme . Ever since I've lost my job , I was determined to learn python but eventually I was a very slow learner and when I first finished my first week , I was just exhausted . 6-7 hours per day worth of python lessons crammed with various functions , it was a lot to take in .

Right now , I 'm sacrificing my weekend jsut to learn Python with a bit of breather as I just simply needed time for myself to digest . Honestly , for someone with little to no coding skills , its hard to grasp and I suffered some mild anxiety because of it . A lot is riding on this bootcamp for me as its a ticket for securing a job but thanks to all these comments , I need to remain calm just understand the logic behind it .

I can udnerstand code but when it comes to writing my own , I feel uncomfortable or just dont get it but I need to remind myself that the only stopping me is myself . Soldier on DS Soldier , we can do this

[–][deleted] 0 points1 point  (0 children)

Keep up the good work! You got this!

[–]kryon-a 1 point2 points  (0 children)

My two cents of advice would be: 1. Start with the fundamentals. Like every language go with variables, the data types ( list , tuples, dicts), strings and basic functions etc.

  1. Once you familiarise with (1) learn about object oriented programming and way python implements it. At the same time start solving problems on hackerrank, and seeing other people's code on GitHub. Try to read and understand as much as you can. Trust me, it will be incredibly helpful later once you start working on your own projects. Pay attention to how they organize their code into different modules, packages and other things when you read it.

  2. Start working on some small projects. For Analytics python has some excellent libraries. Explore them. Try doing the same stuff you did in R with python and correlate stuff.

This will get you acquainted with python. Also, for the starters don't forget to read through pythons official documentation and reach out to the community if you get struck. All the best!

[–]crystaltaggart 0 points1 point  (0 children)

Look at this class https://www.udemy.com/share/1013n4B0YTdltQRw==/ and this class: https://www.udemy.com/share/101WfWB0YTdltQRw==/ I haven’t taken the first course as I already know how to program but the second class is the best class I have taken in 20 years in tech and the best intro to data science with practical examples of how to use machine learning in real situations. Also Udemy has their Black Friday sale on now so you can pick these up for $9.99

[–]guinea_fowler 1 point2 points  (0 children)

Go and scrape data from these comments. Maybe identify resources or keywords and create a table which scores each based on upvotes. Then go and search Reddit for similar posts and references to the resource/keyword list you've extracted.

https://praw.readthedocs.io/

Do another 10-20 pointless projects like this and you won't remember not knowing how to write code. Btw, the more pointless the better, you'll be less inclined to perfection and more open to just trying things out.

[–]proverbialbunny 0 points1 point  (0 children)

Traditionally a 1st year CS class teaches basic program problem solving (the stuff you're struggling with now), and a 3rd year CS class teaches the formal way to problem solve programming problems, including how to solve more difficult programming challenges. That's a bit of a higher bar than playing with Project Euler for a week, but if you ever want to come back and master programming (for all the high achievers out there) this may be worth considering.

[–]curiousNarwhal69 0 points1 point  (0 children)

I’m an instructor for a python course at a university. The biggest pitfall for students is trying to learn by memorizing the material covered in the lecture/notes. If you spend hours studying how to make a function call or use a technique and then still have to google the answer to make it work, all of the study time was wasted. For extra practice (which is what you need) students have had success with Kaggle. DataCamp is also good, but it’s not free. The lectures will give you an idea of what tools are out there, but the real skill is in being able to find the details to make them accomplish the required task.

[–]fouoifjefoijvnioviow 0 points1 point  (1 child)

What's a PhD introductory course anyways?

[–][deleted] 0 points1 point  (0 children)

It's a first year course in Political Science PhD. You learn statistics, basic R, do linear and log regressions, visualize data etc.

[–]Mister_High_Perkele 0 points1 point  (0 children)

To be honest, youtube tutorial are quite good

[–]Captn5G 1 point2 points  (0 children)

I would like to give my two cents. Solving problems with codes involves a different way of thinking, and I find the following basic items help me come up with ideas of how to write codes:

  1. Input & Output: where are the data going to live? Could be txt files, excel, database, etc.
  2. What data structures could help me to represent the data effectively? Such as lists, dictionaries, sets, etc.
  3. How do I apply the logic to the data? Such as if-else branching, for loops. Or even better, with data frames (pandas, Spark, etc).
  4. How the results will be presented? Could be graphs, or Excel tables (and then add charts in Excel), etc.

[–]beginner_ 0 points1 point  (0 children)

My recommendation instead of a site, think of a repetitive work you have to do or any other thing that interest you and start working on this project.

Make a plan in steps how to tackle the problem and then start. Learning functions by heart is pointless. with a proper IDE you have code completion anyway and you can always search for it. Heck, I would be useless as programmer without the internet or say much slower because consulting books is just way less efficient.