Karina Data Scientist

Hi, I'm Karina! A decade ago, I transitioned from finance to the world of data analytics and data science. It is all started with simple VBA code, and I knew my life will never be the same. After that it was SQL, R, Python, PowerBI, Tableau, hours spent with Stackoverflow and Youtube tutorials.

⚡️Want to learn Python or start coding, but it feels overwhelming - start with my "Data Analysis with Python" beginner-friendly masterclass: stan.store/KarinaDataScientist/p/start-programming…
⚡️
If you need a Python portfolio project, check this one out - stan.store/KarinaDataScientist/p/data-analytics-po…

Through my channel, I want to demystify data analysis and share my knowledge — from statistics and Excel to Python and ChatGPT.

Want to learn something new? Subscribe and hit the bell to get notified when I upload new videos!


Karina Data Scientist

Calling the same function with the same inputs repeatedly?

lru_cache remembers results so you don't recalculate.

When lru_cache is helpful:
- Pure functions (same input always gives same output)
- Expensive computations
- Functions called repeatedly with same arguments
- API calls to external services
- Database lookups

When NOT to use:
- Functions that depend on time or random values
- Functions with very large return values
- Functions rarely called with same inputs
- Functions with mutable arguments (lists, dicts)

4 days ago | [YT] | 36

Karina Data Scientist

Need to sort a list of dictionaries or tuples?

itemgetter is cleaner than using lambda functions.

When itemgetter is helpful:
- Sorting dictionaries or tuples
- Finding min/max by a specific key
- Sorting by multiple fields
- Simple key extraction
- Performance-critical sorting

When to use lambda instead:
If you need complex logic:

lambda x: x['age'] * 2
lambda x: x['first'] + x['last']
lambda x: x['score'] if x['passed'] else 0

For simple key access, itemgetter is cleaner.

5 days ago | [YT] | 24

Karina Data Scientist

Writing a class just to store data?

dataclass handles the boilerplate for you.

When dataclass is useful:
- Data containers (storing related values)
- Configuration classes
- API request/response models
- Database record objects
- Simple data transfer objects

What you get automatically:
__init__ method
__repr__ method (nice printing)
__eq__ method (equality comparison)
Type hints built-in
Default values support
Optional immutability

5 days ago | [YT] | 29

Karina Data Scientist

Need to count how many times items appear in a list?

Counter from collections makes this easy.

- Cleaner than manual dictionary counting
- Built-in most_common() method
- Supports addition and subtraction
- Works with any iterable
- Makes intent clear

Common use cases:

Word frequency analysis
Tracking user actions
Vote counting
Log file analysis
Product sales ranking

1 week ago | [YT] | 31

Karina Data Scientist

GitHub Repos That Teach You AI (From Python Basics to GenAI)

These repos have everything:

Complete tutorials
Code you can run
Real projects
Free forever

𝗦𝗧𝗔𝗥𝗧 𝗛𝗘𝗥𝗘: 𝗣𝗬𝗧𝗛𝗢𝗡 𝗙𝗢𝗨𝗡𝗗𝗔𝗧𝗜𝗢𝗡𝗦
1. The Algorithms - Python
Every algorithm explained with code
github.com/TheAlgorithms/Python

Use when: Learning Python fundamentals

𝗠𝗔𝗖𝗛𝗜𝗡𝗘 𝗟𝗘𝗔𝗥𝗡𝗜𝗡𝗚 𝗕𝗔𝗦𝗜𝗖𝗦
2. Machine Learning for Beginners (Microsoft)
12-week curriculum with assignments
github.com/microsoft/ML-For-Beginners

Use when: Starting ML from scratch

3. Homemade Machine Learning
Python ML algorithms from scratch
github.com/trekhleb/homemade-machine-learning

Use when: Want to understand how ML actually works

4. ML Interview Prep
Common ML interview questions + answers
github.com/khangich/machine-learning-interview

Use when: Preparing for ML interviews

𝗗𝗘𝗘𝗣 𝗟𝗘𝗔𝗥𝗡𝗜𝗡𝗚

5. Deep Learning Papers Reading Roadmap
Curated list of DL papers to read
github.com/floodsung/Deep-Learning-Papers-Reading-…

Use when: Understanding DL theory

6. TensorFlow Examples
TensorFlow tutorials and code examples
github.com/aymericdamien/TensorFlow-Examples

Use when: Learning TensorFlow

7. PyTorch Tutorials
Official PyTorch learning resources
github.com/pytorch/tutorials

Use when: Learning PyTorch

𝗚𝗘𝗡𝗘𝗥𝗔𝗧𝗜𝗩𝗘 𝗔𝗜 & 𝗟𝗟𝗠𝘀

8. LLM Course
Complete roadmap to learn LLMs
github.com/mlabonne/llm-course

Use when: Starting with Large Language Models

9. Generative AI for Beginners (Microsoft)
18 lessons on building GenAI appsgithub.com/microsoft/generative-ai-for-beginners

Use when: Building GenAI applications

10. Awesome ChatGPT Prompts
Prompt engineering examples
github.com/f/awesome-chatgpt-prompts

Use when: Learning prompt engineering

11. LangChain
Framework for LLM applications
github.com/langchain-ai/langchain

Use when: Building LLM-powered apps

𝗣𝗥𝗔𝗖𝗧𝗜𝗖𝗔𝗟 𝗣𝗥𝗢𝗝𝗘𝗖𝗧𝗦

12. 500+ AI/ML Projects
Curated list of project ideas
github.com/ashishpatel26/500-AI-Machine-learning-D…

Use when: Need project ideas

13. Awesome Machine Learning
Frameworks, libraries, software
github.com/josephmisiti/awesome-machine-learning

Use when: Finding tools and resources

14. Papers With Code
ML papers with implementation
github.com/paperswithcode

Use when: Implementing research papers

1 week ago | [YT] | 17

Karina Data Scientist

Instead of writing long if-elif chains, you can use dictionary dispatch.

- More readable - Intent is clear
- Easier to extend - Add new key-value pair
- Testable - Each handler tests independently
- Maintainable - Handlers can live in separate modules

Pattern:
dispatch_table = {
key1: handler1,
key2: handler2,
key3: handler3,
}

result = dispatch_table[key](args)

1 week ago | [YT] | 50

Karina Data Scientist

Resample time series data in pandas (aggregate or interpolate)

Turn minute-by-minute data into hourly summaries, or fill gaps in irregular data.

1 week ago | [YT] | 21

Karina Data Scientist

Stop checking if dictionary keys exist

defaultdict creates keys automatically.

1 week ago | [YT] | 24

Karina Data Scientist

pathlib is the modern way to handle file paths

1 week ago | [YT] | 26

Karina Data Scientist

Whether you’re a data analyst, a data engineer or a data scientist, SQL is the language you’ll use a lot to query, clean and transform data.

1 week ago | [YT] | 49