Why “Coca-Cola Chicken Wings” Are Misunderstood — Lessons Beyond the KitchenIf you’ve ever mentioned Coca-Cola chicken wings (可乐鸡翅) to someone unfamiliar with Chinese cuisine, you’ve likely seen a mix of confusion…Dec 29, 2024Dec 29, 2024
Published inTowards Data ScienceHow to Merge Data Frames by The Nearest Match in Pandas? Use merge_asof.A short post about a useful function in Pandas, merge_asof. It’s one of the most used tools in Pandas when dealing with time series data.Feb 18, 20241Feb 18, 20241
Use Set Instead of List in Membership Test, Especially for Large DatasetsPrioritize the O(1) operation instead of one-liners in your Python codeFeb 16, 2024Feb 16, 2024
Published inTowards Data ScienceImplement Agglomerative Hierarchical Clustering with PythonIn this post, I briefly go over the concepts of an unsupervised learning method, hierarchical clustering, and its implementation in PythonJan 18, 20241Jan 18, 20241
Efficient Data Loading with PandasMastering Efficient Data Loading: Practical Techniques and Code Examples in PandasDec 22, 20231Dec 22, 20231
Unlocking the Power of assign() in PandasCreating new columns efficiently using Pandas' assign() methodJul 20, 20232Jul 20, 20232
Published inTowards Data ScienceSlicing A Pandas Dataframe Using “&” and “|” Instead of “and” and “or”when you see ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()Apr 14, 20231Apr 14, 20231
Published inTowards Data ScienceUse to_string() to Stop Python from Hiding the Body of the Printed DataFramesWhat should we do to see the entire printed dataframe after the execution of a Python script?Apr 10, 20231Apr 10, 20231
Published inTowards Data ScienceWhat If .apply() Is Too Slow?Sometimes we need to apply some function to the Pandas Dataframe in Python by using its column(s) as the function's input. However, one of…Dec 8, 20221Dec 8, 20221
Published inTowards Data ScienceUnderstanding Affinity Propagation Clustering And Implementation with PythonOne of the most used clustering methods, affinity propagation, is clearly explained together with the implementation with PythonSep 2, 2022Sep 2, 2022