19. Using pints for units in python

Sdílet
Vložit
  • čas přidán 22. 07. 2024
  • It's critical to keep track of units in scientific computing. Fortunately, python has a few options for tracking and converting units. Here we show you a unit conversion library and the power pint library. We also introduce scipy constants and the molmass library to calculate elemental molar mass. This video has lots of examples of unit conversion for materials science.
    00:00 why care about units?
    1:30 unit_converter
    3:30 pints library
    7:20 combining units
    9:15 scipy constants
    12:15 molmass library
    17:20 custom units
    18:55 electrical conductivity
  • Hry

Komentáře • 13

  • @alvincruz8296
    @alvincruz8296 Před 2 lety

    Saved me probably weeks of grinding. I don't need to reinvent the wheel. Thanks man.

  • @johnseeley9316
    @johnseeley9316 Před 2 lety +1

    Incredibly helpful intro to pint. Thanks Taylor!

  • @tutorial50000
    @tutorial50000 Před 3 lety +1

    Very useful thanks!!!

  • @sonaliyadav511
    @sonaliyadav511 Před 2 lety

    This helped me get started with Pint👍🏽👍🏽 very helpful

  • @markmusk521
    @markmusk521 Před rokem +1

    very very helpful thank you very much

  • @EdVlogsIITMadras
    @EdVlogsIITMadras Před 2 lety +1

    I am unable to find the unit_coverter module. I tried pip and conda. No luck. Can you guide on the installation of this package?

    • @ooddy24
      @ooddy24 Před 2 lety

      on the Jupiter notebook I did: ! pip install unit_converter

  • @thuggfrogg
    @thuggfrogg Před 8 měsíci

    Thanks for putting this together! Would pint be a good solution for specifying physical types like meters in pydantic classes?

    • @TaylorSparks
      @TaylorSparks  Před 8 měsíci

      I've never tried it, but I imagine it would work. If you give it a shot let me know and I will make a video about it

  • @jhawar-ji
    @jhawar-ji Před 11 měsíci

    The first conversion itself is wrong