The Real Python Podcast

Practicing Python With CSV Files and Extracting Values With "filter()"


Listen Later

Are you ready to practice your Python skills some more? There is a new set of practice problems prepared for you to tackle, and this time they’re based on working with CSV files. This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.

David shares an article about functional programming with a focus on the “filter” function. The tutorial covers how to process an iterable and extract the items that satisfy a given condition. It also covers combining filter with other functional tools, and compares it to coding with Pythonic tools like list comprehensions and generator expressions.

We cover several other articles and projects from the Python community including, Excel, Python, and the future of data science, a Bayesian analysis of Lego prices in Python, why can’t comments appear after a line continuation character, teaching Python on the Raspberry Pi400 at the public library, a cross-platform editor designed for writing novels built with Python and Qt, and a text user interface with rich as the renderer.

Spotlight: Python vs JavaScript for Python Developers

Python and JavaScript are two of the most popular programming languages in the world. In this course, you’ll take a deep dive into the JavaScript ecosystem by comparing Python vs JavaScript. You’ll learn the jargon, language history, and best practices from a Python developer’s perspective.

Topics:

  • 00:00:00 – Introduction
  • 00:02:29 – Excel, Python, and the Future of Data Science
  • 00:07:50 – Python Practice Problems: Parsing CSV Files
  • 00:17:09 – Sponsor: Digital Ocean’s App Platform
  • 00:17:45 – A Bayesian Analysis of Lego Prices in Python With PyMC3
  • 00:23:02 – Why Can’t Comments Appear After a Line Continuation Character?
  • 00:28:40 – Python’s filter(): Extract Values From Iterables
  • 00:34:57 – Video Course Spotlight
  • 00:36:24 – How I Teach Python on the Raspberry Pi 400 at the Public Library
  • 00:46:23 – novelWriter: Cross-Platform Editor Designed for Writing Novels Built With Python and Qt
  • 00:48:02 – textual: A Text User Interface With Rich as the Renderer
  • 00:54:58 – Thanks and goodbye
  • Show Links:

    Excel, Python, and the Future of Data Science – What’s the most widely used tool in data science? Is it pandas or NumPy? Is it the Python language itself? Not really. It’s Excel. You might argue that data scientists aren’t using Excel as their primary tool, and you might be right. But Excel enables non-technical users, like small business owners, to gain insights into their data. In this article, Anaconda CEO Peter Wang discusses his goal of making Python and PyData the “conceptual successor” to Excel.

    Python Practice Problems: Parsing CSV Files – In this tutorial, you’ll prepare for future interviews by working through a set of Python practice problems that involve CSV files. You’ll work through the problems yourself and then compare your results with solutions developed by the Real Python team.

    A Bayesian Analysis of Lego Prices in Python With PyMC3 – Follow along with this in-depth analysis of LEGO prices to see Bayesian analysis in action. Along the way, you’ll how pooled and unpooled linear models can be used to determine if a LEGO set is fairly priced. The article is quite technical, so experience with Bayesian statistics is recommended.

    Why Can’t Comments Appear After a Line Continuation Character? – Chaining together many object methods can create long tines that break the PEP 8 79-character line length recommendation. You can use \ to break the chain of methods onto individual lines, but if you want to leave comments at the end of some of the lines, you’re out of luck. There’s another pattern, though, that solves this.

    Python’s filter(): Extract Values From Iterables – In this step-by-step tutorial, you’ll learn how Python’s filter() works and how to use it effectively in your programs. You’ll also learn how to use list comprehension and generator expressions to replace filter() and make your code more Pythonic.

    How I Teach Python on the Raspberry Pi 400 at the Public Library – Community-based programming courses are a great way to introduce folks to computer programming that otherwise may not have the means to do so. One of the barriers to learning to code is cost. You need a computer to program on, after all. But with the advent of tiny computers like the Raspberry Pi, computers aimed at education are more affordable than ever.

    Projects:

    • novelWriter: Cross-Platform Editor Designed for Writing Novels Built With Python and Qt
    • textual: A Text User Interface With Rich as the Renderer
    • Additional Links:

      • Episode 27: Preparing for an Interview With Python Practice Problems
      • PyMC3: Probabilistic Programming in Python
      • Black: The uncompromising code formatter
      • My review of the Raspberry Pi 400
      • Will McGugan’s Blog: Introducing Textual
      • Level up your Python skills with our expert-led courses:

        • Python vs JavaScript for Python Developers
        • Python's map() Function: Transforming Iterables
        • Functional Programming in Python
        • Support the podcast & join our community of Pythonistas

          ...more
          View all episodesView all episodes
          Download on the App Store

          The Real Python PodcastBy Real Python

          • 4.7
          • 4.7
          • 4.7
          • 4.7
          • 4.7

          4.7

          136 ratings


          More shows like The Real Python Podcast

          View all
          Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

          Software Engineering Radio - the podcast for professional software developers

          272 Listeners

          The Changelog: Software Development, Open Source by Changelog Media

          The Changelog: Software Development, Open Source

          283 Listeners

          Thoughtworks Technology Podcast by Thoughtworks

          Thoughtworks Technology Podcast

          41 Listeners

          Talk Python To Me by Michael Kennedy

          Talk Python To Me

          592 Listeners

          Software Engineering Daily by Software Engineering Daily

          Software Engineering Daily

          624 Listeners

          Soft Skills Engineering by Jamison Dance and Dave Smith

          Soft Skills Engineering

          269 Listeners

          Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

          Super Data Science: ML & AI Podcast with Jon Krohn

          298 Listeners

          Python Bytes by Michael Kennedy and Brian Okken

          Python Bytes

          213 Listeners

          Data Engineering Podcast by Tobias Macey

          Data Engineering Podcast

          142 Listeners

          Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

          Syntax - Tasty Web Development Treats

          982 Listeners

          DataFramed by DataCamp

          DataFramed

          266 Listeners

          Kubernetes Podcast from Google by Abdel Sghiouar, Kaslin Fields

          Kubernetes Podcast from Google

          181 Listeners

          Practical AI by Practical AI LLC

          Practical AI

          190 Listeners

          The Stack Overflow Podcast by The Stack Overflow Podcast

          The Stack Overflow Podcast

          64 Listeners

          The Pragmatic Engineer by Gergely Orosz

          The Pragmatic Engineer

          52 Listeners