Four weeks is enough to learn the Python that machine learning pipelines actually use: data structures, functions, NumPy, pandas, scikit-learn and clean scripts. It is not enough to learn all of Python, and you should not try. Spend about 60 to 90 minutes a day on the plan below, finish the checkpoint quiz, and you will be ready to follow a 14-day AI internship without stalling on syntax.
What “Python for ML pipelines” covers and what it leaves out
An ML pipeline is a sequence: load data, clean it, turn it into features, split it, train a model, evaluate it, and save the result. Python is the glue at every step. This roadmap is limited to the skills that sit inside that sequence.
Included:
- Core types (lists, dicts, tuples, sets, strings) and loops or comprehensions
- Functions, imports, and reading error messages
- File handling for CSV and JSON
- NumPy arrays and vectorised operations
- pandas for loading, cleaning, grouping and merging
- Matplotlib for basic plots
- scikit-learn for splitting, preprocessing, training, evaluating and wrapping steps in a Pipeline
- Reproducible scripts: virtual environments, random seeds, saving models
Deliberately left out: web frameworks, GUI programming, advanced object-oriented design, deep learning frameworks, and competitive-programming tricks. They are useful later, but they will not help you in a two-week internship.
Week-by-week Python roadmap with daily exercises for ML work
Use any free environment, such as a local Python install with Jupyter or a hosted notebook. Each day has one small task. Type the code yourself rather than pasting it, and keep every exercise in one folder so you have a record of your progress.
Week 1: Core Python for handling data
| Day | Topic | Daily exercise |
|---|---|---|
| 1 | Variables, numbers, strings, f-strings | Write a script that takes marks in five subjects and prints the total and percentage in a formatted sentence. |
| 2 | Lists and loops | Given a list of 20 numbers, compute the mean, the maximum and the count above the mean without using libraries. |
| 3 | Dictionaries and sets | Count word frequencies in a paragraph using a dict, then list the unique words using a set. |
| 4 | Conditionals and list comprehensions | Rewrite Day 2’s filtering as a comprehension. Label each number “low”, “mid” or “high”. |
| 5 | Functions and arguments | Write mean(), variance() and normalize() functions with docstrings. |
| 6 | Files, CSV and JSON | Read a small CSV with the csv module and write selected rows to a JSON file. |
| 7 | Errors and review | Deliberately cause five different errors (TypeError, KeyError, and so on). Write one line on what each message means and how you fixed it. |
Week 2: NumPy and pandas
| Day | Topic | Daily exercise |
|---|---|---|
| 8 | NumPy arrays, shape, dtype | Create a 5×4 array and print its shape, its column means and its row sums. |
| 9 | Vectorisation and broadcasting | Standardise each column (subtract mean, divide by standard deviation) with no loops. |
| 10 | pandas Series and DataFrame basics | Load any open CSV. Use head, info, describe and write three observations. |
| 11 | Selecting and filtering | Use loc, iloc and boolean masks to extract specific subsets and sort them. |
| 12 | Missing values and types | Count nulls per column. Fill one numeric column with the median and drop rows missing a key field. Note which choice you made and why. |
| 13 | groupby, merge, apply | Group by a category and compute averages. Merge with a second small table. |
| 14 | Plotting and review | Draw a histogram, a scatter plot and a bar chart with Matplotlib. Label axes and titles. |
Week 3: Features and your first models with scikit-learn
| Day | Topic | Daily exercise |
|---|---|---|
| 15 | Features vs target, train/test split | Pick a dataset, separate X and y, and split with a fixed random_state. |
| 16 | Encoding categories | Apply one-hot encoding to a categorical column. Compare the column count before and after. |
| 17 | Scaling | Fit a scaler on training data only, then transform the test data. Write one sentence on why this order matters. |
| 18 | First classifier | Train logistic regression. Print accuracy on the test set. |
| 19 | First regressor | Train linear regression on a numeric target. Report MAE and R². |
| 20 | Metrics beyond accuracy | Print a confusion matrix, precision and recall. Explain what each number says about mistakes. |
| 21 | Cross-validation and review | Run 5-fold cross-validation and compare the mean score with the single split. |
Week 4: Pipelines, clean scripts and a mini project
| Day | Topic | Daily exercise |
|---|---|---|
| 22 | Pipeline and ColumnTransformer | Rebuild Week 3’s steps as one Pipeline with numeric and categorical branches. |
| 23 | Comparing models | Try a decision tree and a random forest in the same pipeline. Tabulate the scores. |
| 24 | Saving and loading models | Save a trained pipeline with joblib, reload it in a fresh script and predict on three rows. |
| 25 | Scripts, not just notebooks | Move your code into a .py file with functions and a main(). Run it from the terminal. |
| 26 | Environments and reproducibility | Create a virtual environment, export requirements.txt and set all random seeds. |
| 27 | Mini project | End to end on one dataset: load, clean, split, pipeline, evaluate, save. |
| 28 | Write-up and quiz | Write a half-page README describing data, method, result and one limitation. Then take the quiz below. |
Free 2-Week CareerSwami Internship
Online, 14 days, with a free offer letter and a free completion certificate once you finish the work. Check with your college that it fits your requirement before you enrol.
Worked example: one cleaning-to-model pass (illustrative)
This sketch shows the shape of a Day 22 to 24 exercise. It is illustrative only; the file name and column names are invented, and the code has not been run here. Adapt it to your own dataset.
import pandas as pd
import joblib
from sklearn.model_selection import train_test_split
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import OneHotEncoder, StandardScaler
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import classification_report
df = pd.read_csv("students.csv") # hypothetical file
df = df.dropna(subset=["passed"]) # target must not be missing
X = df.drop(columns=["passed"])
y = df["passed"]
num_cols = ["attendance", "study_hours"] # hypothetical columns
cat_cols = ["branch"]
prep = ColumnTransformer([
("num", StandardScaler(), num_cols),
("cat", OneHotEncoder(handle_unknown="ignore"), cat_cols),
])
model = Pipeline([("prep", prep), ("clf", LogisticRegression(max_iter=500))])
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.2, random_state=42, stratify=y)
model.fit(X_train, y_train)
print(classification_report(y_test, model.predict(X_test)))
joblib.dump(model, "model.joblib")
Notice what the pipeline buys you. The scaler learns its mean only from training rows, so no test information leaks in. The same object that was trained is the one you save. If you can explain each line in your own words, you have the Python skill this roadmap targets.
Checkpoint quiz: Python for ML pipelines
Answer without looking at notes, then check yourself by running small tests in a notebook. Eight or more correct means you are ready; fewer means repeat the relevant week.
- What is the difference between a list and a tuple, and which can you modify?
- Write a comprehension that returns the squares of the even numbers in
range(10). - What does the shape
(150, 4)tell you about an array? - Why is vectorised NumPy code preferred over a Python loop for large arrays?
- Which pandas call shows column types and non-null counts?
- What is the difference between
locandiloc? - Name two ways to handle missing numeric values and one risk of each.
- Why must a scaler be fitted on training data only?
- Why can accuracy be misleading on an imbalanced dataset?
- What problem does
random_statesolve? - What does a scikit-learn Pipeline prevent that separate manual steps allow?
- How do you save a trained model and load it in another script?
Scoring guide for the checkpoint quiz
| Score | Meaning | What to do |
|---|---|---|
| 10 to 12 | Ready | Start on a second dataset to build speed. |
| 8 to 9 | Nearly ready | Redo the exercise for each question you missed. |
| 5 to 7 | Gaps in foundations | Repeat Weeks 2 and 3 at a slower pace. |
| 0 to 4 | Early stage | Repeat Week 1, then continue the sequence. |
Fitting the roadmap into your AKU programme: what the university pages show
Andhra Kesari University was established as a State University with effect from 11-01-2022, growing out of a PG centre that began in 1993. Its Courses Offered page lists a University College of Engineering & Technology (2024-25) with B.Tech in CSE, Computer Science & IoT, and AI & Machine Learning, plus M.Sc Computer Science. Treat that page as a 2024 snapshot and check the current version.
For UG science students, the B.Sc Honours curricular framework (A.Y. 2025-26) sets a Semester VI internship of at least 180 hours (8 weeks) for 3 credits, and includes Skill Enhancement Courses with 8 credits for AI. A 14-day online internship is much shorter than that 180-hour requirement, so think of it as extra practical exposure and a portfolio item, not a replacement for what your programme demands. Whether any outside or online internship is accepted for credit is not stated in the sources reviewed, so ask before assuming.
The roadmap also suits M.Sc Computer Science students, whose 2026-27 syllabus PDFs are posted by year. Compare the syllabus with the weeks above to see which skills your coursework already covers and which you must self-study. If you are at an affiliated college, rules may differ, so ask your own college as well.
Four steps to verify before you start:
- Open the syllabus PDF for your programme and year and mark which Python or ML topics appear, so you can skip or extend weeks.
- Ask your department coordinator in writing whether an online internship can count toward any internship requirement, and in what form.
- If you are in a B.Sc programme, read the Skill Enhancement Course details in the framework with your faculty adviser to learn which AI course you will take and when.
- Open the 2026-27 academic calendar page for your programme and note exam and break dates before fixing your four-week schedule.
- Ask your department or college office what documents they need for any internship, such as an offer letter or completion certificate, and who signs them off.
Common stumbling points in Python for ML, and how to fix them
- Copying notebooks without typing. You will recognise code but not produce it. Retype every exercise, then rewrite it from memory the next day.
- Skipping data cleaning. Most time in real pipelines goes to missing values, wrong types and odd categories. Days 12 and 16 matter more than they look.
- Scaling before splitting. This leaks test information. Use a Pipeline so the order is enforced.
- Chasing accuracy alone. Always look at a confusion matrix and the class balance.
- Staying in notebooks. Day 25’s script exercise is what makes your work repeatable by someone else.
Using the final days and the internship itself
Keep your Week 4 mini project and README in a public repository, since a small, clean project is easy to discuss. When the internship starts, the free two-week online programme at CareerSwami gives you a deadline-driven setting to apply what you practised; it offers a free offer letter and a free completion certificate after successful completion, across 26 tracks. Pick the track that matches the skills you have just built.
During the 14 days, keep a short daily log: what you attempted, what broke, what you changed. That log makes it easy to describe your work honestly in an interview or on a resume.
Frequently Asked Questions
Can I finish this Python roadmap if I have never coded before?
Yes, but expect to need closer to two hours a day in Week 1. If Week 1 feels slow, extend it by a few days rather than rushing into pandas, because every later week depends on loops, functions and dictionaries.
Do I need a laptop with a GPU for these four weeks?
No. Everything here, including NumPy, pandas and scikit-learn models, runs on an ordinary laptop or a free hosted notebook. GPUs matter for deep learning, which this plan deliberately excludes.
Which datasets are good for the daily exercises?
Use small, clean, openly available tabular datasets with a mix of numeric and categorical columns, such as classic classification and regression practice sets. Check each dataset’s licence and keep files under a few megabytes so exercises run quickly.
Should I learn deep learning libraries before the internship?
Not within these four weeks. Solid pandas and scikit-learn skills transfer to almost every beginner AI task, and deep learning libraries are far easier once you understand splits, metrics and pipelines.
How do I know if my Python is good enough after the quiz?
Score eight or more, and be able to explain your mini project line by line without looking at it. If you can rebuild the pipeline on a new dataset in under two hours, you are in good shape.
Can the roadmap help with B.Sc Skill Enhancement Courses in AI?
It can supply practice, but course content is set by the university. Check your syllabus and ask your faculty which topics the AI courses cover, then use the roadmap to fill gaps or get ahead.
What if I miss several days of the plan as a Andhra Kesari University student?
Do not try to double up. Resume at the first missed day, and trim the review exercises (Days 7, 14, 21) if you must. The mini project in Week 4 matters more than perfect attendance.
Is a short online internship worth doing alongside a degree with a long internship requirement?
It can be, as practice and portfolio material, provided it does not displace required coursework. Confirm with your department how it would be treated, and do not assume it replaces any mandatory internship.
Related Artificial Intelligence guides
- Azim Premji University Students: AI for Education Data Projects You Can Finish in an Internship
- Reva University Students: Reading Research Papers Quickly During an AI Internship
- Gondwana University Students: Using Free Cloud GPUs Wisely for Internship Training Runs
- All Artificial Intelligence internship guides
Ready to put this into practice?
Join the free two-week CareerSwami online internship in Artificial Intelligence. The internship, the offer letter and the completion certificate are free.




















