Practicing Coding

How do you guys practice using python?
I’m 35% of the way through the Data Analyst course and I just don’t feel like my python knowledge is sufficient. I keep learning new things by progressing with DQ, but there isn’t much practice anything I’ve already learned, and I definitely haven’t mastered it.

The guided projects are helpful, sort of, but not really. Any suggestions?

1 Like

Hi Chris,

Welcome to the DQ community!

I agree, the guided projects are great, but more practice is needed to really crystallize the things we are learning.

One thing I found helpful is to split my studying up into two parts. The first part I go over new missions and take notes on the key aspects (as well as some syntax I think is especially important to know). The second part of my studying I review the notes I made for myself.

The thing that I have found to be the most helpful is to get data sets that look interesting and start practicing the things I know. This is where I find out the things I have learned really well and the things I need to brush up on. The trickiest part is finding data to practice on. There is a great article on the Dataquest blog that provides information on where you can obtain free data sets.

I have found this to be helpful in my own learning and hope it can help you out too.


In my case–and this may be too basic for what you’re asking–to achieve mastery for the topic of each lesson within the mission I initially solve the problem using the instructions. Then I delete the solution and do it again (and again and again). Then I walk away from it and try it again. Each repetition I try to just follow the initial instruction for the problem and not rely on the steps to achieve. And then I move on to the next lesson.

Right now I’m repeating the Dictionaries and Frequency Tables section because I didn’t feel I’d mastered the concepts.

1 Like

I have found that the hardest thing is just getting started in transferring over to using Python instead of, let’s say, Excel.

Unfortunately, the only thing that one can do is just “force yourself” to do a task in Python that you would do with a different tool (dB, Excel, Tableau).

I am constantly re-reading the lessons. I usually do every lesson twice and I am actually going back and reading everything a third time now. I, admittedly, have ADHD. So, the only way I can learn is through constantly cycling back.

Take solace in the fact that it takes time and patience and practice to get comfortable. I have been at it for a while and am just starting to get it.

Going back and reading everything 3 times seems to be a bad sign for the course itself, no?
Personally, i think more dedicated practice should be incorporated with dataquest. I like that there are lessons and guided project. But I would personally suggest code challenges for each set of lesson.

I’m using to practice the basic python im learning from dataquest. Hopefully others find that helpful if they’re looking for python challenges.


1 Like

Dear chrishubbrd92,

I have been learning Python since 2012 and have been through several courses, projects and programming for research and fun.

You are right to feel this way, Dataquest’s main role is not to teach you Python, That said it’s Pandas and Numpy tutorials are the best I have seen.

People have already proposes good options like hackerank, codibility, hireview or Coursera courses.

I think when it comes to basic Python its hard to beat and -2

because they start you from the bottom and build you up with all the minutia.
It features Codesculptor with interactive help files and also a lively (when I took it) community of students and teaching assistants.

That said, after all these years I still learn new Python tricks every week and that is just the way of things.

Also remember that it is ok to forget things you do not use often.

I hope this helps,
Best of Luck

Thanks for the response Lou!

Hi Chris,

Another web site you can use to practice Python is

The site gives you a relatively simple problem to solve using Python. When you upload your solution to the site, you can how other people solved the problem. It’s a way to learn from other people.

Good luck.

Hello everyone :slight_smile:,

As a business & law bachelor I started in this world in order to expand my analytical skills and I ended up enrolled in a Software Development course as well.

Either way, now I am 100% committed to Dataquest, and I use to take notes about new missions, understand the new code, libraries, and parameters, but always keeping notes aside, so I can rescue them.

I just want to have an abstract view of the tools a data scientist has, understand them, but I never memorize them from the beginning, but eventually using them.

What do you think guys?

I do the same thing. Really understanding the basics helps you out in the long run.

I am not sure what your question is. Can you please rephrase it?

Make a good note, it crystalises you knowledge

Numpy Characteristic

  • Array can only contain 1 datatype
  • When a cell display’s nan mean it was original a non-numeric data

import numpy as np – Importing Numpy

ARRAY = np.array([LIST]) – Convert a list into a n-dimensional array

Process of importing numpy file

ARRAY.shape – Output the number of columns and rows in an array

  • Use ARRAY.shape[1] to display number of rows
  • Use ARRAY.shape[0] to display number of columns

ARRAY[ROWINDEX, COLUMNINDEX] – Select an object based on positional indexing

ARRAY[ROWINDEX] – Select an object based on row indexing

ARRAY[:, COLUMNINDEX] – Select an object based on column indexing

ARRAY[[ROW1,ROW2],[COLUMN1,COLUMN2]] – Select an object in multiple rows and columns

Example : columns_1_4_7 = taxi[:,[1, 4, 7]]

VECTORCALCULATION = ARRAY[INDEX] + ARRAY[INDEX] – Using maths operation on multiple arrays

The arrays used to calculate the vector must be of the same shape (Same number of rows and columns)

ARRAY.METHOD() – To use a function on a n-dimensional array

ARRAY.max(axis = 1) – To output the max value of every row or column

Use axis = 1 for row and axis = 0 for column

ARRAY = np.genfromtext(“FILE”, delimiter = “,”) – Read a delimited file into numpy array directly

Example : taxi = np.genfromtxt(‘nyc_taxis.csv’, delimiter = ‘,’)

ARRAY.type – Shows the datatype used in the array

Using maths symbols on an array – The function of the math symbol will apply on all objects in an array

  • Example : np.array([2,4,6,8]) + 10 >>> [12 14 16 18]
  • Example : np.array([2,4,6,8]) < 5 >>> [True True False False]

Boolean Indexing – Using Boolean to filter out object that meets specified criteria and select those objects

Modifying object in array (Shortcut Method) – ARRAY[CONDITION] = VALUE