#pythonhacks 검색 결과
Loop through the list to apply: 💡 "code" Neatly transform your text with minimal fuss! 🌟 #PythonHacks
#PythonHacks - One day i was stuck with 2 huge arrays and had to find common and non-common elements. #Numpy came to rescue - setdiff1d() and intersect1d() functions do just that #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode
Dict comprehension: Similar to list comprehension, but for dictionaries. E.g., "new_dict = {k:v*2 for k, v in old_dict.items()}". A smart way to handle dictionaries! #PythonHacks (6/10)
In-place value swapping: Swap the values of two variables without a temp variable. Just type "a, b = b, a". This is Python's way of swapping. No extra variable needed! #PythonHacks (2/10)
Found a nifty way to return a export a whole bunch of state from a function as a Python object. 🐲🔥🤷♂️☕️ #PythonHacks
Strongly typed Python? You bet! Use typing for type hints and improve readability. Cleaner, safer code. #PythonHacks #CodeSmart
#PythonHacks - in #Pandas, because it is column major, a col -> row access is ~10x faster than row -> col... Wish I knew this earlier! #mindblown #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode
#PythonHacks - When iterating #Pandas #DataFrame, using loc() instead of iloc() can boost performance by ~12x! Difference is due to how #python calculates memory address to retrieve an item #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode
#PythonHacks - I knew apply() function of #pandas and equivalent map() function for #numpy operations. But there's another great function - reduce() from #functools. Use it to apply operator on all elements #pythoncode #Python #learntocode #machinelearning #coders #100daysofcode
#PythonHacks - Can we improve performance of #Pandas #dataframe in row wise operations? Sure! #Numpy to the rescue! Convert df to np array, and it takes nano seconds instead of milli seconds to iterate!!! #pythoncode #Python #learntocode #machinelearning #coders #100daysofcode
#PythonHacks - random number generators are used everywhere. #Numpy made my life simple by offering super efficient functions like rand(), randint(), randn(), choice() etc #100daysofcode #Python #pythoncode #coders #learntocode #devcommunity #pythonlearning
#PythonHacks - do you want to time your code? Use a #Python generator. Any repetitive task can be decoupled and converted to a #generator. It can be re-used over any method, like below - #pythonlearning #pythoncode #learntocode #coders #devcommunity #100daysofcode
#PythonHacks - Is #Lambda function better than traditional approach in #Python? Maybe not. But it is far convenient to use, and doesn't degrade performance much! Use it more often! #pythoncode #numpy #learntocode #machinelearning #coders #devcommunity #100daysofcode
#PythonHacks - Ever stuck with filtering arrays based on a condition? #Numpy to the rescue. Use where fn to extract data based on conditions #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode
Pair data effortlessly with Python’s zip! Combine iterables into tuples for cleaner, faster code. Simple and powerful! #PythonHacks #CleanCode
Code smarter, not longer! Unlock the power of these 6 Python techniques to write cleaner, shorter, and more efficient code. #PythonHacks #CodeEfficiently #LearnPython #ProgrammingTips #CodingMadeEasy
➡️ Simplify your code with this #Python trick: 🤖 Flatten a nested list using a list comprehension: flattened_list = [x for sublist in nested_list for x in sublist] #pythonhacks #codingtips
Dict comprehension: Similar to list comprehension, but for dictionaries. E.g., "new_dict = {k:v*2 for k, v in old_dict.items()}". A smart way to handle dictionaries! #PythonHacks (6/10)
In-place value swapping: Swap the values of two variables without a temp variable. Just type "a, b = b, a". This is Python's way of swapping. No extra variable needed! #PythonHacks (2/10)
#PythonHacks - One day i was stuck with 2 huge arrays and had to find common and non-common elements. #Numpy came to rescue - setdiff1d() and intersect1d() functions do just that #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode
Loop through the list to apply: 💡 "code" Neatly transform your text with minimal fuss! 🌟 #PythonHacks
#PythonHacks - in #Pandas, because it is column major, a col -> row access is ~10x faster than row -> col... Wish I knew this earlier! #mindblown #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode
#PythonHacks - When iterating #Pandas #DataFrame, using loc() instead of iloc() can boost performance by ~12x! Difference is due to how #python calculates memory address to retrieve an item #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode
#PythonHacks - do you want to time your code? Use a #Python generator. Any repetitive task can be decoupled and converted to a #generator. It can be re-used over any method, like below - #pythonlearning #pythoncode #learntocode #coders #devcommunity #100daysofcode
#PythonHacks - random number generators are used everywhere. #Numpy made my life simple by offering super efficient functions like rand(), randint(), randn(), choice() etc #100daysofcode #Python #pythoncode #coders #learntocode #devcommunity #pythonlearning
#PythonHacks - Can we improve performance of #Pandas #dataframe in row wise operations? Sure! #Numpy to the rescue! Convert df to np array, and it takes nano seconds instead of milli seconds to iterate!!! #pythoncode #Python #learntocode #machinelearning #coders #100daysofcode
Found a nifty way to return a export a whole bunch of state from a function as a Python object. 🐲🔥🤷♂️☕️ #PythonHacks
#PythonHacks - I knew apply() function of #pandas and equivalent map() function for #numpy operations. But there's another great function - reduce() from #functools. Use it to apply operator on all elements #pythoncode #Python #learntocode #machinelearning #coders #100daysofcode
Code smarter, not longer! Unlock the power of these 6 Python techniques to write cleaner, shorter, and more efficient code. #PythonHacks #CodeEfficiently #LearnPython #ProgrammingTips #CodingMadeEasy
#PythonHacks - Ever stuck with filtering arrays based on a condition? #Numpy to the rescue. Use where fn to extract data based on conditions #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode
➡️ Simplify your code with this #Python trick: 🤖 Flatten a nested list using a list comprehension: flattened_list = [x for sublist in nested_list for x in sublist] #pythonhacks #codingtips
Strongly typed Python? You bet! Use typing for type hints and improve readability. Cleaner, safer code. #PythonHacks #CodeSmart
#PythonHacks - Is #Lambda function better than traditional approach in #Python? Maybe not. But it is far convenient to use, and doesn't degrade performance much! Use it more often! #pythoncode #numpy #learntocode #machinelearning #coders #devcommunity #100daysofcode
#PythonHacks - My efficiency boosted after learning #Numpy functions. One of the ways you can convert multi-dimensional arrays to 1d is by using flatten() fn. #pythoncode #Python #learntocode #devcommunity #100daysofcode #machinelearning #coders
#PythonHacks - ever felt the need to strip all string columns in pandas? there's a simple solution. First select all string (object) columns and then use a lambda function. Do you know a better way? #pandas #pythonlearning #pythoncode #Python #machinelearning #100daysofcode
#PythonHacks - When working with large #DataFrames of #Pandas, I realised that itertuples() is ~60x faster than iterrows() while iterating! That's an awesome thing to boost performance! #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode
Something went wrong.
Something went wrong.
United States Trends
- 1. The BONK 105K posts
- 2. FINALLY DID IT 564K posts
- 3. Good Tuesday 38.1K posts
- 4. #tuesdayvibe 2,239 posts
- 5. #PueblosPorLaPaz 1,630 posts
- 6. Taco Tuesday 12.1K posts
- 7. $FULC 10.2K posts
- 8. Piers 95.5K posts
- 9. Oslo 81.5K posts
- 10. Jasmine Crockett 91.9K posts
- 11. Hurts 146K posts
- 12. Compromised 19.3K posts
- 13. Judah 4,519 posts
- 14. Jalen 84.3K posts
- 15. #TuesdayFeeling 1,253 posts
- 16. #BAZAARWomenofTheYearXFreen 607K posts
- 17. #Nifty 12.4K posts
- 18. Politico 115K posts
- 19. LINGLING BA HAUS64 744K posts
- 20. Polk County 6,956 posts