Skip to content

A collection of code snippets from the publication Daily Dose of Data Science on Substack: https://avichawla.substack.com.

Notifications You must be signed in to change notification settings

whysage/Daily-Dose-of-Data-Science

Β 
Β 

Repository files navigation

View on GitHub View on Medium Daily Dose of Data Science View on LinkedIn

alt text

Daily Dose of Data Science is a publication on Substack that brings together intriguing frameworks, libraries, technologies, and tips that make the life cycle of a Data Science project effortless.

This repository is a collection of all the code snippets presented in my publication. If you want to receive these tips in your mailbox daily, you can subscribe to my Substack newsletter.

Run These Code Snippets in Your Local Machine

To download the tips listed here, you can clone this repo.

git clone https://github.com/ChawlaAvi/Daily-Dose-of-Data-Science

Table of Contents

  1. Pandas
  2. Jupyter Tips
  3. Python
  4. Plotting
  5. NumPy
  6. Memory Optimization
  7. Cool Tools
  8. Run-time Optimization
  9. Sklearn
  10. Debugging
  11. Missing Data
  12. ML-AI News
  13. Machine Learning
  14. Statistics
  15. Testing
  16. Terminal

Pandas

Title Notebook Substack Article
Display Progress Bar With Apply() in Pandas πŸ”— πŸ”—
Supercharge value_counts() Method in Pandas With Sidetable πŸ”— πŸ”—
Explore CSV Data Right From The Terminal πŸ”— πŸ”—
Define the Correct DataType for Categorical Columns πŸ”— πŸ”— Medium
Don't Create Conditional Columns in Pandas with Apply πŸ”— πŸ”—
Write Your Own Flavor Of Pandas πŸ”— πŸ”—
Create DataFrame Hassle-free By Using Clipboard πŸ”— πŸ”—
Alter the Datatype of Multiple Columns at Once πŸ”— πŸ”—
Why you should not dump DataFrames to a CSV πŸ”— πŸ”— Medium
Why You Should Not Read CSVs with Pandas πŸ”— πŸ”— Medium
Parallelize Pandas Apply() With Swifter πŸ”— πŸ”—
A Hidden Feature of Describe Method In Pandas πŸ”— πŸ”—
Enrich Your Notebook With Interactive Controls πŸ”— πŸ”—
Data Analysis Using No-Code Pandas In Jupyter πŸ”— πŸ”—
Create Pivot Tables, Aggregations and Plots Without Any Code πŸ”— πŸ”— Medium
Parallelize Pandas with Pandarallel πŸ”— πŸ”— Medium
Pretty Plotting With Pandas πŸ”— πŸ”—
How to Read Multiple CSV Files Efficiently πŸ”— πŸ”— Medium
Configure Sklearn To Output Pandas DataFrame πŸ”— πŸ”—
Datatype For Handling Missing Valued Columns in Pandas πŸ”— πŸ”— Medium
Vectorization Does Not Always Guarantee Better Performance πŸ”— πŸ”—

Jupyter Tips

Title Notebook Substack Article
Get Notified When Jupyter Cell Has Executed πŸ”— πŸ”—
Clear Cell Output In Jupyter Notebook During Run-time πŸ”— πŸ”—
CodeSquire: The AI Coding Assistant You Should Use Over GitHub Copilot πŸ”— πŸ”—
Find Your Code Hiding In Some Jupyter Notebook With Ease πŸ”— πŸ”—
Enrich Your Notebook With Interactive Controls πŸ”— πŸ”—
Data Analysis Using No-Code Pandas In Jupyter πŸ”— πŸ”—
Create Pivot Tables, Aggregations and Plots Without Any Code πŸ”— πŸ”— Medium
Restart Notebook Without Losing Variables πŸ”— πŸ”— Medium
Retrieve Previously Computed Output In Jupyter Notebook πŸ”— πŸ”— Medium
Transfer Variables Between Jupyter Notebooks πŸ”— πŸ”— Medium

Python

Title Notebook Substack Article
Specify Loops and Runs In %%timeit πŸ”— πŸ”—
Don't Use time.time() To Measure Execution Time πŸ”— πŸ”—
Import Your Python Package as a Module πŸ”— πŸ”—
Fine-grained Error Tracking With Python 3.11 πŸ”— πŸ”—
Run Python Project Directory As A Script πŸ”— πŸ”—
Use Slotted Class To Improve Your Python Code πŸ”— πŸ”—
Using Dictionaries In Place of If-conditions πŸ”— πŸ”—
In Defense of Match-case Statements in Python πŸ”— πŸ”—

Plotting

Title Notebook Substack Article
Elegantly Plot the Decision Boundary of a Classifier πŸ”— πŸ”—
Dot Plot: A Potential Alternative to Bar Plot πŸ”— πŸ”—
Hexbin Plots As A Richer Alternative to Scatter Plots πŸ”— πŸ”—
Enrich Your Notebook With Interactive Controls πŸ”— πŸ”—
Regression Plot Made Easy with Plotly πŸ”— πŸ”—
Pretty Plotting With Pandas πŸ”— πŸ”—
Polynomial Linear Regression Plot Made Easy With Seaborn πŸ”— πŸ”—
Analyse Flow Data With Sankey Diagrams πŸ”— πŸ”—
Waterfall Charts: A Better Alternative to Line/Bar Plot πŸ”— πŸ”—

NumPy

Title Notebook Substack Article
Polynomial Linear Regression with NumPy πŸ”— πŸ”—

Memory Optimization

Title Notebook Substack Article
Define the Correct DataType for Categorical Columns πŸ”— πŸ”— Medium
Datatype For Handling Missing Valued Columns in Pandas πŸ”— πŸ”— Medium
Save Memory with Python Generators πŸ”— πŸ”—

Cool Tools

Title Notebook Substack Article
CodeSquire: The AI Coding Assistant You Should Use Over GitHub Copilot πŸ”— πŸ”—
Find Unused Python Code With Ease πŸ”— πŸ”—
Enrich Your Notebook With Interactive Controls πŸ”— πŸ”—
Data Analysis Using No-Code Pandas In Jupyter πŸ”— πŸ”—
Modify Python Code During Run-Time πŸ”— πŸ”— Medium
Modify Function During Run-Time πŸ”— πŸ”— Medium
Importing Modules Made Easy with Pyforest πŸ”— πŸ”—
Create Pivot Tables, Aggregations and Plots Without Any Code πŸ”— πŸ”— Medium

Run-time Optimization

Title Notebook Substack Article
Don't Create Conditional Columns in Pandas with Apply πŸ”— πŸ”—
Why you should not dump DataFrames to a CSV πŸ”— πŸ”— Medium
Parallelize Pandas Apply() With Swifter πŸ”— πŸ”—
Parallelize Pandas with Pandarallel πŸ”— πŸ”— Medium
How to Read Multiple CSV Files Efficiently πŸ”— πŸ”— Medium

Sklearn

Title Notebook Substack Article
Build Baseline Models Effortlessly With Sklearn πŸ”— πŸ”—
Polynomial Linear Regression with NumPy πŸ”— πŸ”—
An Elegant Way to Import Metrics From Sklearn πŸ”— πŸ”—
Feature Tracking Made Simple In Sklearn Transformers πŸ”— πŸ”—
Configure Sklearn To Output Pandas DataFrame πŸ”— πŸ”—

Debugging

Title Notebook Substack Article
Don't use print() to debug your code. πŸ”— πŸ”— Medium
Inspect Program Flow with IceCream πŸ”— πŸ”—
Lesser-known Feature of f-strings in Python πŸ”— πŸ”—

Missing Data

Title Notebook Substack Article
Handle Missing Data With Missingno πŸ”— πŸ”—
Datatype For Handling Missing Valued Columns in Pandas πŸ”— πŸ”—

ML-AI News

Title Notebook Substack Article
Now You Can Use DALLΒ·E With OpenAI API πŸ”— πŸ”—

Machine Learning

Title Notebook Substack Article
Build Baseline Models Effortlessly With Sklearn πŸ”— πŸ”—
Polynomial Linear Regression with NumPy πŸ”— πŸ”—

Statistics

Title Notebook Substack Article
Why Correlation (and Other Statistics) Can Be Misleading πŸ”— πŸ”—

Testing

Title Notebook Substack Article
Generate Your Own Fake Data In Seconds πŸ”— πŸ”—

Terminal

Title Notebook Substack Article
Explore CSV Data Right From The Terminal πŸ”— πŸ”—

About

A collection of code snippets from the publication Daily Dose of Data Science on Substack: https://avichawla.substack.com.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%