Hoppa till huvudinnehållet
HemPython

course

Writing Efficient Python Code

MedelnivåNivå
Uppdaterad 2026-01
Learn to write efficient code that executes quickly and allocates resources skillfully to avoid unnecessary overhead.
Starta Kursen Gratis
PythonProgramming
4 tim
15 videos
52 exercises
4,000 XP
150K+
Intyg om genomförd kurs

Skapa ditt gratis konto

Fortsätt Med GoogleVisa fler alternativ

eller


Genom att fortsätta godkänner du våra Användarvillkor, vår Integritetspolicy och att dina uppgifter lagras i USA.

Älskad av elever på tusentals företag

Group

Tränar du ett team?

Prova för företag

Kursbeskrivning

As a Data Scientist, the majority of your time should be spent gleaning actionable insights from data -- not waiting for your code to finish running. Writing efficient Python code can help reduce runtime and save computational resources, ultimately freeing you up to do the things you love as a Data Scientist. In this course, you'll learn how to use Python's built-in data structures, functions, and modules to write cleaner, faster, and more efficient code. We'll explore how to time and profile code in order to find bottlenecks. Then, you'll practice eliminating these bottlenecks, and other bad design patterns, using Python's Standard Library, NumPy, and pandas. After completing this course, you'll have the necessary tools to start writing efficient Python code!The videos contain live transcripts you can reveal by clicking "Show transcript" at the bottom left of the videos. The course glossary can be found on the right in the resources section. To obtain CPE credits you need to complete the course and reach a score of 70% on the qualified assessment. You can navigate to the assessment by clicking on the CPE credits callout on the right.

Förkunskaper

Data Types in PythonPython Toolbox
1

Foundations for efficiencies

In this chapter, you'll learn what it means to write efficient Python code. You'll explore Python's Standard Library, learn about NumPy arrays, and practice using some of Python's built-in tools. This chapter builds a foundation for the concepts covered ahead.
Starta Kapitel
2

Timing and profiling code

In this chapter, you will learn how to gather and compare runtimes between different coding approaches. You'll practice using the line_profiler and memory_profiler packages to profile your code base and spot bottlenecks. Then, you'll put your learnings to practice by replacing these bottlenecks with efficient Python code.
Starta Kapitel
Writing Efficient Python Code
Kurs
slutförd

Få ett intyg om genomförd kurs

Lägg till denna merit i din LinkedIn-profil, ditt CV eller din meritförteckning
Dela det på sociala medier och i din prestationsbedömning
Anmäl Dig Nu

Gå med över 19 miljoner elever och börja Writing Efficient Python Code i dag!

Skapa ditt gratis konto

Fortsätt Med GoogleVisa fler alternativ

eller


Genom att fortsätta godkänner du våra Användarvillkor, vår Integritetspolicy och att dina uppgifter lagras i USA.

Utveckla dina datakunskaper med DataCamp för mobilen

Gör framsteg när du är på språng med våra mobila kurser och dagliga 5-minuters kodningsutmaningar.