Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Today, we'll introduce Python’s
What is the
|
|
Beginner to Expert in Python in just 5 minutes
Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Today, we’ll explore the datetime module — the fastest way to work with dates and timestamps in Python What is datetime module? ⏰ A built-in Python library that supplies classes for dealing with dates & times. 🛞 Create, manipulate, and format date and time values. ❓ Why it matters - Think of last 3 month, 6 month sales tracking; invoice generation dates, or scheduling reminders - datetime is the tool to...
Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Today: Lets dive right away into some of the applications and advanced functions of "math" module. Do check out last two issues for a refresher. 📝 Sum of all numbers in a list? In: import math amounts = [50.12, 25.35, 14.53] total = math.fsum(amounts) print(total) Out: 90.0 🚀🚀 Multiply all numbers of list in one go! In: print(math.prod([2, 2, 3])) Out: 12 📍 Distance between two points (latitude, longitude...
Welcome back to Pandas Daily! Your daily 5-minute boost to becoming confident in Python. Today is the 2nd day of Python’s math module where we go one level deep! You might go into memory lane as some concepts we would have studied during high school. Feel free to go through first part real quick. 📐 Remember Pythagoras's Theorem? Calculate hypotenuse from two shorter sides In: import math print(math.hypot(3, 4)) Out: 5.0 🌟 Taking logarithms in variety of ways In: print(math.log(100)) # natural...