Course Content
Day-2: How to use VScode (an IDE) for Python?
0/1
Day-3: Basics of Python Programming
This section will train you for Python programming language
0/4
Day-4: Data Visualization and Jupyter Notebooks
You will learn basics of Data Visualization and jupyter notebooks in this section.
0/1
Day-5: MarkDown language
You will learn whole MarkDown Language in this section.
0/1
Day-10: Data Wrangling and Data Visualization
Data Wrangling and Visualization is an important part of Exploratory Data Analysis, and we are going to learn this.
0/1
Day-11: Data Visualization in Python
We will learn about Data Visualization in Python in details.
0/2
Day-12,13: Exploratory Data Analysis (EDA)
EDA stands for Exploratory Data Analysis. It refers to the initial investigation and analysis of data to understand the key properties and patterns within the dataset.
0/2
Day-15: Data Wrangling Techniques (Beginner to Pro)
Data Wrangling in python
0/1
Day-26: How to use Conda Environments?
We are going to learn conda environments and their use in this section
0/1
Day-37: Time Series Analysis
In this Section we will learn doing Time Series Analysis in Python.
0/2
Day-38: NLP (Natural Language Processing)
In this section we learn basics of NLP
0/2
Day-39: git and github
We will learn about git and github
0/1
Day-40: Prompt Engineering (ChatGPT for Social Media Handling)
Social media per activae rehna hi sab kuch hy, is main ap ko wohi training milay ge.
0/1
Python ka Chilla for Data Science (40 Days of Python for Data Science)
About Lesson

The Code is available here

 
Join the conversation
Saad Khalid Abbasi 3 months ago
df['age']=df['age'].fillna(df['age'].mean())
Reply
Saad Khalid Abbasi 3 months ago
# Importing Libraries import pandas as pd import numpy as np import seaborn as sns# Loading DataSet df=sns.load_dataset('titanic') df['age']=df['age'].fillna(df['age'].mean()) x=df[['age','fare','pclass','parch','sex','sibsp']] y=df['survived'] x=pd.get_dummies(x,columns=['sex'])# Importing ML Algorithm from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier from sklearn.neighbors import KNeighborsClassifier from sklearn.model_selection import GridSearchCV from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score x_train, x_test, y_train, y_test = train_test_split(x, y, train_size=0.75, random_state=42)# Random ForestPrameter param_cv={'n_estimators':[10,50 ,100], 'min_samples_split':[2,3,4], 'max_depth':[3,5,7, None], 'max_features': ['log2','sqrt']}# Decision Tree Parameter param_cvv={ 'max_depth':[3,5,7,None],'min_samples_split':[ 2,3,4]}# KNN Neighbour Parameter param_cvvv={'n_neighbors':[5,7],'weights':['uniform','distance']}models = [(RandomForestClassifier(),param_cv,'Random Forest Classifier'), (DecisionTreeClassifier(),param_cvv,'Decision Tree Classifier'), (KNeighborsClassifier(),param_cvvv,'KNeighbour')] # model_names = ['Random Forest Classifier','Decision Tree Classifer','KNN Classifier'] for model,param_grid,model_names in models: grid_search=GridSearchCV(model,param_grid,cv=5,scoring='accuracy') grid_search.fit(x,y) print(f"Model: {model_names}") print('Best Parameters are: ',grid_search.best_params_) print("Best Score:",grid_search.best_score_*100) best_model=grid_search.best_estimator_ y_predict=best_model.predict(x_test) accurac=accuracy_score(y_test,y_predict) print('Accuracy Score for ',model_names,'is',accurac) print("n")
Reply
Muhammad Tufail 7 months ago
Thanks for so comprehensive Leactures
Reply
shafiq ahmed 10 months ago
X = pd.get_dummies(X, columns=['sex'])
Reply
shafiq ahmed 10 months ago
df['age'].fillna(df['age'].mean(),inplace=True)
Reply
shafiq ahmed 10 months ago
age columns main nan values hain
Reply
shafiq ahmed 10 months ago
how we share my notebook in github
Reply
shafiq ahmed 10 months ago
github ka link please share kar dain
Reply
Mamoon Abdullah 11 months ago
X.age.fillna(value = X['age'].mean(), inplace=True)
Reply