How can novices learn Python quickly?

d0a7c01a5d20ee2b73ac7ab0102dbb47.jpeg

In this article, we'll cover how to learn Python effectively. You should know that "data science" is the science used to solve, explore problems and extract valuable information from data.

To do this effectively, you need to organize datasets, train machine learning models, visualize results, and more.

There's never been a better time to learn Python.

In fact, Forbes ranks it among the top 10 technical skills in terms of job demand growth. Today let's discuss why this is...

Why learn Python?

Python is one of the most widely used languages ​​in the world, and it has a passionate user community:

494b1ba8899e86a5e75e121bf8fed963.jpeg

Python popularity, TIOBE index

It has a more devoted following among the data science profession.

Some people judge the quality of a programming language by the simple "Hello, world!" program. By this standard, Python can do very well:

print( "hello, world!" )

For comparison, here's the same output in Java:

public class Main {
    public static void main(String[] args) {
        System.out.println("hello, world!");
    }
}

Well, seriously, simplicity is one of Python's greatest strengths. Due to its precise and efficient syntax, Python can accomplish the same task with less code than other languages. This makes for a refreshing speed in implementing solutions.

Plus, Python's vibrant data science community means you'll be able to find plenty of tutorials, code snippets, and fixes for common mistakes. Stackoverflow will become one of your best friends.

 Finally, Python has an all-star lineup of libraries (also known as packages) for data analysis and machine learning , which drastically reduces the time it takes to produce results. More on these later.

How to learn Python effectively?

Before we discuss what you need to learn, let's discuss what you don't.

You don't need a CS degree.

Most data scientists will never tackle topics like memory leaks, cryptography, or "Big O" notation. As long as you can write clean, logical code in a scripting language like Python or R, you should be fine.

You don't need a full Python course. Python and data science are not synonymous.

c70bc9899bc576bc4c55f813ce76e21a.png

You don't need to memorize all the syntax.

Instead, focus on picking up intuitions like when functions are appropriate or how conditional statements work. After googling, reading documentation and good practice, you will gradually memorize the syntax.

We recommend a top-down approach.

We promote a top-down approach, with the goal of getting results first and then solidifying concepts over time. In fact, we prefer to forego "classroom" learning in favor of real-world practice.

1. You will start by learning core programming concepts.

2. Next, you'll gain working knowledge of essential data science libraries.

3. Finally, you will practice and refine your skills through practical projects.

This method allows you to quickly master while having more fun.

 Install Python via Anaconda 

There are several ways to install Python on your computer, but we recommend using the Anaconda bundle, which contains the libraries needed for data science.

Step 1: Core Programming Concepts

Effective programming is not about memorizing syntax, but mastering a new way of thinking.

So, take the time to build a solid foundation in core programming concepts. These will help you translate the solutions in your head into instructions for the computer.

If you're new to programming.... we recommend the excellent Automate the Boring Stuff with Python book, released online for free under a Creative Commons license.

The book promises "practical programming for beginners" and keeps every lesson grounded. Read Chapter 6 - Manipulating Strings and complete the practice questions.

d831d038bb31be9cbaa279bb4455f2d7.png

If you just need a brush up on Python syntax , then we recommend the following videos:

https://youtu.be/N4mEzFDjqtA

Again, the goal of this step is not to learn everything there is to know about Python and programming. Instead, focus on intuition.

You should be able to answer the following questions:

• What is the difference between integers, floats, and strings?

• How to use Python as a calculator?

• What is a for loop? When do I write one?

• What is the basic structure of the function?

• How to add logic using conditional statements (if...else...)?

• How does the import statement work?

If you want to practice more core programming concepts , check out the resources below.

• Code Fights is a platform with lots of short coding challenges that can be completed in under 5 minutes (although it's so much fun that you might find yourself playing for hours at a time). You'll earn points and unlock new levels along the way, which is also a great way to track your progress.

• The Python Challenge is one of the coolest puzzles on the web, so don't be intimidated by its 1990's graphics. You can complete all 33 levels with the help of Python script. One user called it "an addictive way to learn the ins and outs of Python..." I agree!

• PracticePython.org is a collection of short practice questions in Python. It is updated with a new question almost every week. What's really nice is that the author includes multiple user-submitted solutions for each problem, so you can see alternative ways to solve them.

• How to Think Like a Computer Scientist is a great interactive online book that takes a whirlwind tour through key programming concepts (using Python). If you're completely new to programming, this might be a good option. It's like a condensed "CS 101" course.

Step 2: Basic Data Science Libraries

Next, we will focus on the data science part of "How to Learn Python for Data Science".

As we mentioned before, Python has an array of all-star libraries for data science. Libraries are simply bundles of pre-existing functions and objects that you can import into your scripts to save time.

These are our recommended steps to efficiently acquire new libraries:

1. Open a new Jupyter Notebook (see below).

2. Read the library's documentation for 30 minutes to understand the high-level introduction of its modules.

3. Import the library into your Jupyter Notebook.

4. Follow its step-by-step quickstart tutorial to see the library in action.

5. Spend another 30 minutes looking at its documentation to see what else it can do.

We don't recommend digging deeper into the library right now, as you'll likely forget most of what you've learned when you get into the project. Instead, aim to discover the capabilities of each library.

If you installed Python via the Anaconda bundle as we suggested above, then Jupyter Notebook will also come with it. Jupyter Notebook is a lightweight IDE loved by data scientists. We recommend it for your projects. You can open a new notebook through the Anaconda Navigator that comes with Anaconda. Check out this short video for instructions.

These are the basic libraries you need:

digital currency

NumPy allows simple and efficient numerical computations, and many other data science libraries are built on top of it.

• Documentation

• Quick start tutorial

panda

Pandas is a high-performance library for data structures and exploratory analysis. It is built on top of NumPy.

• Documentation

• Quick start tutorial

Matplotlib

Matplotlib is a flexible plotting and visualization library. It's powerful but a little cumbersome. You now have the option to skip Matplotlib and start with Seaborn (see Seaborn recommendations below).

• Documentation

• Quick start tutorial

Scikit-learn

Scikit-Learn is the premier general-purpose machine learning library in Python. It has many popular algorithms and modules for preprocessing, cross-validation, etc.

• Documentation

• Quick start tutorial

Bonus: Seaborn

Seaborn makes it easier to draw common data visualizations. It is built on top of Matplotlib and provides a more pleasant high-level wrapper.

• Documentation

• Quick start tutorial

Step 3: End-to-End Project

By now, you will have a basic understanding of programming and some working knowledge of basic libraries. This actually covers most of the Python you need to get started with data science.

At this point, some students may feel a little overwhelmed. It's okay, it's normal.

If you took a slow and traditional bottom-up approach, you might not feel overwhelmed, but it took 10x longer to get here. The key now is to jump right in and start gluing everything together. Again, our goal here is simply to learn enough to get started.

Next, it's time to solidify your knowledge with lots of practice and projects. You have a few options:

Kaggle competition

The first option is to participate in Kaggle, a website that hosts data science competitions.

The main advantage of Kaggle is that each project is independent. You'll get datasets, targets, and tutorials to get you started.

The main disadvantage of competitions is that they are often not representative of real-world data science. "Getting Started" tournaments are too basic, and standard tournaments (i.e. tournaments with prize pools) are often too difficult for beginners.

If you're interested in this path, check out our beginner's guide to Kaggle.

DIY project

Another option is to build your own project and choose the dataset you are interested in.

The main advantage of this approach is that projects are more representative of real-world data science. You may need to define your own goals, collect data, clean datasets, design features, and more.

The downside of DIY projects is that you need to already be familiar with proper data science workflows. Without one, you could miss important steps or get stuck without knowing how to proceed. If you choose to go this route, check out our article with several DIY project ideas.

2d6a4efaae34b7b57cae706543bbba76.jpeg

 ⬇️Click "Read the original text"

 Sign up for free Data analysis training camp

Guess you like

Origin blog.csdn.net/zhongyangzhong/article/details/130445414