Useful Pandas🐼 method you should definitely know
✅ head()
✅ info()
✅ fillna()
✅ melt()
✅ pivot()
✅ query()
✅ merge()
✅ assign()
✅ groupby()
✅ describe()
✅ sample()
✅ replace()
✅ rename()
@Python_Codes
✅ head()
✅ info()
✅ fillna()
✅ melt()
✅ pivot()
✅ query()
✅ merge()
✅ assign()
✅ groupby()
✅ describe()
✅ sample()
✅ replace()
✅ rename()
@Python_Codes
💡 Python Tip: Do you know Ellipsis(...) can be used as a placeholder in Python, just like a 𝘱𝘢𝘴𝘴 statement?
@Python_Codes
@Python_Codes
💡 Python Life Hack: Do you know you can copy the files from a computer to a mobile phone 📱 without any cable using Python 🐍 ?
@Python_Codes
@Python_Codes
Python Class Anatomy
Almost everything a Python class definition can contain summed up in one image :)
@Python_Codes
Almost everything a Python class definition can contain summed up in one image :)
@Python_Codes
Python Tip:
You can use dict o
@Python_Codes
You can use dict o
n a clas
s instance to get all instance attributes as a dictionary@Python_Codes
Python Tip:
You can use the calendar module in one line from the command line with python -m calendar
@Python_Codes
You can use the calendar module in one line from the command line with python -m calendar
@Python_Codes
Most of the time, we don't want to share our wifi passwords, in that case, we generate a QR and stick it on the wall.
@Python_Codes
@Python_Codes
round() function
the round function is used to convert the floating-point into a specified number of decimals number
@Python_Codes
the round function is used to convert the floating-point into a specified number of decimals number
@Python_Codes
How do you check if an array is monotonic?
An array is monotonic if the elements are sorted either in descending order or ascending order.
Share and Support
@Python_Codes
An array is monotonic if the elements are sorted either in descending order or ascending order.
Share and Support
@Python_Codes
What are pure functions?
A pure function is a function that will return the same value given the same arguments. A function is not pure if there is something outside the function that can change its return value, given the same arguments.
Share and Support
@Python_Codes
A pure function is a function that will return the same value given the same arguments. A function is not pure if there is something outside the function that can change its return value, given the same arguments.
Share and Support
@Python_Codes
💡🐍 Did you know?
You can use slices in Python to insert elements to a list in arbitrary positions?
Share and Support
@Python_Codes
You can use slices in Python to insert elements to a list in arbitrary positions?
Share and Support
@Python_Codes