Machine Learning and Python Tutorials

Python Data Pre-Processing Example: Multiple CSVs into Single File

Imagine that you need to analyze the data for multiple years, and the client gives the data in multiple CSV files, one per year. Even worse, some columns in some years are in a different format. The task for data pre-processing, huh? Let's write a Python script for it.

8 minutes read

Python: Generate CSV File with Dummy Data - Three Options

If you want to quickly generate a CSV file with Python for ML model testing, this tutorial will show you how to do it in three different ways: plain Python loop, adding Python functions, or using the NumPy library.

3 minutes read

Python: Show Number as Percentage with Format and F-String

At the end of ML projects, you often get the accuracy numbers, like R2 score, as a float. What if you want to show them as a percentage on the screen? Let's return to Python fundamentals on concatenating strings and numbers with different options.

2 minutes read

Python Import Libraries: Three Syntax Versions

Python has a few syntax ways to import libraries/modules: `import library (as ...)` or `from library import ...`. For newcomers, it may be confusing which one to use in which case. Let me explain.

2 minutes read