Python Crash Course: Part 12 - Writing Functions

Sdílet
Vložit
  • čas přidán 23. 07. 2024
  • Python functions are the primary way you bundle your code for reuse when using Python for analytics and data science. For example, cleaning data before analyzing it.
    This crash course video will teach you how to write Python functions.
    After completing this crash course series, you will have the foundational Python skills to take additional analytics, data science, and machine learning courses using Python.
    ☕ If you found this content useful and would like to support the channel, you can buy me a coffee: www.buymeacoffee.com/DaveOnData
    --------------------------------------------------------------------------------------------
    VIDEO CHAPTERS
    --------------------------------------------------------------------------------------------
    00:00 Video Intro
    00:36 Introducing Functions
    08:18 Function Parameters
    15:04 Variable Scope
    --------------------------------------------------------------------------------------------
    FREE DATA SCIENCE CRASH COURSES
    --------------------------------------------------------------------------------------------
    If you're ready to see what Python skills make possible, be sure to check out my FREE on-demand data science crash courses!
    Here's what you get with any of these courses:
    1️⃣ On-Demand: Watch the course when it fits your schedule
    2️⃣ PDF of all slides
    3️⃣ All Python code as a Jupyter Notebook
    4️⃣ All data so you can experiment
    5️⃣ Resources to continue your learning.
    Data science with Python. You've got this if you want it:
    💻 Decision Trees with Python:
    bit.ly/DecisionTreesWithPython
    💻 Tuning Decision Trees with Python:
    bit.ly/TuningDecisionTreesWit...
    💻 Logistic Regression with Python:
    bit.ly/LogisticRegressionWith...
    💻 Cluster Analysis with Python:
    bit.ly/ClusterAnalysisWithPython
    #pythonforbeginners #pythoncrashcourse #pythoncourse #pythonprogramming #pythontutorial #python
  • Věda a technologie

Komentáře • 10

  • @DaveOnData
    @DaveOnData  Před 5 měsíci +1

    --------------------------------------------------------------------------------------------
    FREE DATA SCIENCE CRASH COURSES
    --------------------------------------------------------------------------------------------
    If you're ready to see what Python skills make possible, be sure to check out my FREE on-demand data science crash courses!
    Here's what you get with any of these courses:
    1 - On-Demand: Watch the course when it fits your schedule
    2 - PDF of all slides
    3 - All Python code as a Jupyter Notebook
    4 - All data so you can experiment
    5 - Resources to continue your learning.
    Data science with Python. You've got this if you want it:
    💻 Decision Trees with Python:
    bit.ly/DecisionTreesWithPython
    💻 Tuning Decision Trees with Python:
    bit.ly/TuningDecisionTreesWithPython
    💻 Logistic Regression with Python:
    bit.ly/LogisticRegressionWithPython
    💻 Cluster Analysis with Python:
    bit.ly/ClusterAnalysisWithPython

  • @michaelt312
    @michaelt312 Před 5 měsíci +2

    Yet another great video. I really appreciate how you are building a solid foundation and following a logical progression.

    • @DaveOnData
      @DaveOnData  Před 5 měsíci +1

      Thank you for this feedback! Although it is a crash course, I designed it to be a logical progression of the needed skills.

  • @waleednanashy6550
    @waleednanashy6550 Před 5 měsíci +1

    Great

    • @DaveOnData
      @DaveOnData  Před 5 měsíci

      Thank you for the feedback! I am glad you enjoyed the video.

  • @drsam7655
    @drsam7655 Před 2 měsíci

    Why is the value of the global variable my_string wasn't changed when you changen it in the function, but the value of the global list did change in the function?

  • @jasongins
    @jasongins Před 5 měsíci +1

    Would it be better to avoid using global variable names inside of functions unless the intent actually is to make a change to a global variable?

    • @DaveOnData
      @DaveOnData  Před 5 měsíci +1

      Great question! Here are some best practices I would recommend when writing Python code for analytics and data science:
      1 - Avoid naming collisions wherever you can.
      2 - Prefer using functions/methods that return altered copies of the original objects rather than directly altering objects.
      Regarding point 2, you will see this a lot in my upcoming pandas tutorial video.

  • @dmitriydikunov7400
    @dmitriydikunov7400 Před 5 měsíci +1

    Is it relevant to start learning Python in 2024, if i wanna enter it uni this year?

    • @DaveOnData
      @DaveOnData  Před 5 měsíci

      If your university program teaches you Python, then maybe not. However, having more experience with coding will make all of your classes that use Python easier.