Automated Python Code Generation with Mito

Krish Naik · Beginner ·💻 AI-Assisted Coding ·4y ago

Key Takeaways

Demonstrates automated Python code generation with Mito for data analysis

Full Transcript

hello all my name is krishnak and welcome to my youtube channel so guys today in this particular video we are going to see how we can quickly analyze clean and manipulate the data using my to sheet now this miter sheet is an amazing library guys you'll be able to do very amazing things with respect to eda like exploratory data analysis and automated python generation code this entire video is basically done by jake who is from mito itself so please make sure that you watch this video till the end because as you all know that the first module in the life cycle of a data science project is eda right apart from that it also helps you to generate the python code automatically so definitely it is a win-win situation so definitely have a look on to this and was a video till the end so let's proceed hey this is jake from mido i'm going to give you a quick demo of how you can analyze clean and manipulate your data do some exploratory data analysis as well using mido if you don't know mito is a spreadsheet interface for python all you need to do is call on this interface and everything you do in this interface here is going to generate the equivalent python in the code cell below what i've done so far is just import this avocado data set and when i did that it automatically took this csv avocado file and turned it into a data frame for me it wrote this code for me i didn't have to write this code or any of the code you're going to see myself all i have to do is just interact in this interface here to get data into the sheet all we have to do is first call the sheet so you can import the mighty sheet package and call mightysheet.cheap which calls this interface here and once i've done that i can import data one of two ways so one i can pass in the data frame that i'm already working with has an argument here and then we'll see that data populate the sheet or i can go to the import model search my local files click the file i want and see that data imported here we've imported a data set we see one thing we noticed is that the csv file we had it had an index column already and we automatically automatically have an index in mida so i can delete this column just by clicking delete there we go and now i see my data so we have these dates and we have this information about this avocados that we're dealing with these different dates so i'm going to look at this date by month so we have these different months here so what i'm going to do is i'm going to add a column and then just really easily use this month function selecting this data and we see it will retrieve the month from each of these from each of these entries here in the date column and so now that we've done that we have this new column here i think i want to rename it just to make it a little simpler month here we see it updates and renames that column month and those two operations we just did that code is generated below here so automatically generates the code for us that we can use carried forward in our analysis or to automate a process or whatever we want to do with it now that i have these months let's say i want to look at the frequencies i have for the different months there's two ways i can do this two ways i can visualize this so i can select this column here and for any column we select by clicking on this button here i have three menus here so i can apply filters to that column so we have uh we have 18 000 entries here i can apply a filter let's say i just want the month of october so that would be 10. we get that we see now there's only 1500 so we can see how many entries from october we have and again when we apply that filter we get the equivalent code for that as well i'm going to take off this filter really quickly though we can also look at the values here so this is going to show us the different unique values we have in the column obviously here it's 1 through 12 and how many of those unique values we have for each of them and what percentage of the total amount of values that is so a really great way to see our values we also get the summary stats here we can sort of visualize this breakdown here we'll show you another visualization a little bit we get the mean standard deviation the quartiles max how many null values we have here is zero and lots of other good values as well and we get that for all the columns in our data set all you do is just click the button here i can also apply a pivot table to look at this data if i want to look at the counts of how many i have for each month so i'll click our pivot button here this creates a new data frame that we're creating with the pivot table here and we have the option to delete duplicate or rename any of these data frames that we have so different data frames appear as different sheets down here as my row i'm going to put month and then i'm gonna actually just do a simple value count of month here and we see for each month how many values we have so for one we have one nine four four et cetera et cetera and i can put a sort on any of these columns as well by going here and so i can put this in actually i want this in descending order and so we can see one january has the most most march is the second most et cetera et cetera june has the least amount of values i can also visualize this data as well using our graphing here actually and when i apply that sort you'll see the the code for it right there as well as the code for the pivot table down here and so now let's apply a graph we can show you some of our visualizations so i want to look at uh the graph i'm going to make is from df2 the chart type we can do bar chart box histogram or scatter plot let's do a bar chart here that's my x-axis i want the month very simply it's my y-axis i want month count and we'll see this chart here a little bit uh more detail than we had in the summary statistics box and we can look at this data we can hover over to see the values we can zoom in on specific values as well and if i want to copy the code from this visualization this is a really important feature because a lot of people when they're getting into python and even when they're really advanced with python getting the code read for visualizations can take a lot of time so with this feature here you can just generate your your visualization really simply with this menu here and then copy the code and we can paste it here and we have the code for this visualization in fact if i run this if i run this cell and then i would run this cell we get our visualization right here so you can use these visualizations carry forward in your analysis so let me close this and let's go back to our base data set so other operations we can do as i said add and delete columns we can export this as a csv we can undo and redo steps we also provide a step history here so you can see all the steps you've taken in your analysis and again all those steps are reflected in the code that is auto commented and i'll close this uh one other feature just to show you here is that we do have merging functionality so if i did want to join these two columns together i could do that i can decide what type of merge i want to do sorry not two columns these two data sets together i could do a lookup a left join a right join an inner join or an outer join we can decide what the merge key is going to be what columns we want to keep in the merge et cetera and that would as we see in df3 here generate the equivalent code there uh maybe that's the last thing is we actually do have a full screen mode so if you click that button you'll see the mighty sheet populate full screen and it will uh still generate code so mino's really powerful tool for generating python in this visual manner you don't have to leave your code you're not sacrificing code at all you still get all the same code all the same usable auto documented code but you get to do it in the visual environment so you don't have to go to stack overflow or google to look up syntax all the time it's really fast way to get your analysis done because that's what's important after all is finishing your analysis and having some good work done so i hope you check out mido again here's the install instructions and the full documentation and yeah hope you enjoy thank you

Original Description

Mito Installation Instructions: https://docs.trymito.io/getting-started/installing-mito Mito YouTube Channel: https://m.youtube.com/channel/UCN9o_0m1fwCjigfIpnKr0oA
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Krish Naik · Krish Naik · 0 of 60

← Previous Next →
1 Natural Language Processing|Stemming
Natural Language Processing|Stemming
Krish Naik
2 Natural Language Processing|BagofWords
Natural Language Processing|BagofWords
Krish Naik
3 Gaussian distribution or Normal Distribution in statisctics
Gaussian distribution or Normal Distribution in statisctics
Krish Naik
4 Natural Language Processing|TF-IDF for Machine Learning| Text Prerocessing
Natural Language Processing|TF-IDF for Machine Learning| Text Prerocessing
Krish Naik
5 Log Normal Distribution in Statistics
Log Normal Distribution in Statistics
Krish Naik
6 Covariance in Statistics
Covariance in Statistics
Krish Naik
7 Confusion matrix, Precision, Recall| Data Science Interview questions
Confusion matrix, Precision, Recall| Data Science Interview questions
Krish Naik
8 Tutorial 44-Balanced vs Imbalanced Dataset and how to handle Imbalanced Dataset
Tutorial 44-Balanced vs Imbalanced Dataset and how to handle Imbalanced Dataset
Krish Naik
9 Implementing a Spam classifier in python| Natural Language Processing
Implementing a Spam classifier in python| Natural Language Processing
Krish Naik
10 Tutorial 11-Exploratory Data Analysis(EDA) of Titanic dataset
Tutorial 11-Exploratory Data Analysis(EDA) of Titanic dataset
Krish Naik
11 Face Recognition using open CV and VGG 16 Transfer Learning
Face Recognition using open CV and VGG 16 Transfer Learning
Krish Naik
12 Pedestrian Detection using OpenCV from Videos
Pedestrian Detection using OpenCV from Videos
Krish Naik
13 Face and Eye Detection from Videos using HAAR Cascade Classifier
Face and Eye Detection from Videos using HAAR Cascade Classifier
Krish Naik
14 Reading, Writing and Displaying images with Opencv| OpenCV Tutorial
Reading, Writing and Displaying images with Opencv| OpenCV Tutorial
Krish Naik
15 OpenCV Installation | OpenCV tutorial
OpenCV Installation | OpenCV tutorial
Krish Naik
16 Face and Eye Detection from Images using HAAR Cascade Classifier
Face and Eye Detection from Images using HAAR Cascade Classifier
Krish Naik
17 Car Detection using HAAR Cascade and Opencv from Videos.
Car Detection using HAAR Cascade and Opencv from Videos.
Krish Naik
18 Using OpenFace for Face recognition in Keras
Using OpenFace for Face recognition in Keras
Krish Naik
19 OpenPose Tutorial with Tensorflow
OpenPose Tutorial with Tensorflow
Krish Naik
20 Multiple Linear Regression using python and sklearn
Multiple Linear Regression using python and sklearn
Krish Naik
21 Dimensional Reduction| Principal Component Analysis
Dimensional Reduction| Principal Component Analysis
Krish Naik
22 Movie Recommender System using Python
Movie Recommender System using Python
Krish Naik
23 TPR,FPR,FNR,TNR, Confusion Matrix
TPR,FPR,FNR,TNR, Confusion Matrix
Krish Naik
24 Precision, Recall and F1-Score
Precision, Recall and F1-Score
Krish Naik
25 Artificial Neural Network for Customer's Exit Prediction from Bank
Artificial Neural Network for Customer's Exit Prediction from Bank
Krish Naik
26 GridSearchCV- Select the best hyperparameter for any Classification Model
GridSearchCV- Select the best hyperparameter for any Classification Model
Krish Naik
27 RandomizedSearchCV- Select the best hyperparameter for any Classification Model
RandomizedSearchCV- Select the best hyperparameter for any Classification Model
Krish Naik
28 K Nearest Neighbor classification with Intuition and practical solution
K Nearest Neighbor classification with Intuition and practical solution
Krish Naik
29 K Means Clustering Intuition
K Means Clustering Intuition
Krish Naik
30 Create custom Alexa Skill- Lambda function- Part2
Create custom Alexa Skill- Lambda function- Part2
Krish Naik
31 Hierarchical Clustering intuition
Hierarchical Clustering intuition
Krish Naik
32 Implement Transfer Learning with a generic Code Template
Implement Transfer Learning with a generic Code Template
Krish Naik
33 Gender Classifier and Age Estimator using Resnet Convolution Neural Network
Gender Classifier and Age Estimator using Resnet Convolution Neural Network
Krish Naik
34 Unlock Your Application With Your Face using OpenCV
Unlock Your Application With Your Face using OpenCV
Krish Naik
35 Draw rectangle from webcam and sketch process it on a live feed
Draw rectangle from webcam and sketch process it on a live feed
Krish Naik
36 Complete Life Cycle of a Data Science Project
Complete Life Cycle of a Data Science Project
Krish Naik
37 How we can apply Machine Learning in Finance
How we can apply Machine Learning in Finance
Krish Naik
38 Deep Learning in Medical Science
Deep Learning in Medical Science
Krish Naik
39 How to switch your career to Data Science.
How to switch your career to Data Science.
Krish Naik
40 Linear Regression Mathematical Intuition
Linear Regression Mathematical Intuition
Krish Naik
41 Handle Categorical features using Python
Handle Categorical features using Python
Krish Naik
42 Machine Learning Algorithm- Which one to choose for your Problem?
Machine Learning Algorithm- Which one to choose for your Problem?
Krish Naik
43 DBSCAN Clustering Easily Explained with Implementation
DBSCAN Clustering Easily Explained with Implementation
Krish Naik
44 Curse of Dimensionality Easily explained| Machine Learning
Curse of Dimensionality Easily explained| Machine Learning
Krish Naik
45 Feature Selection Techniques Easily Explained | Machine Learning
Feature Selection Techniques Easily Explained | Machine Learning
Krish Naik
46 Tutorial 29-R square and Adjusted R square Clearly Explained| Machine Learning
Tutorial 29-R square and Adjusted R square Clearly Explained| Machine Learning
Krish Naik
47 Cross Validation using sklearn and python | Machine Learning
Cross Validation using sklearn and python | Machine Learning
Krish Naik
48 Handling Missing Data Easily Explained| Machine Learning
Handling Missing Data Easily Explained| Machine Learning
Krish Naik
49 Deploy Machine Learning Model using Flask
Deploy Machine Learning Model using Flask
Krish Naik
50 Deployment of Deep Learning Model using Flask
Deployment of Deep Learning Model using Flask
Krish Naik
51 How to Visualize Multiple Linear Regression in python
How to Visualize Multiple Linear Regression in python
Krish Naik
52 K Nearest Neighbour Easily Explained with Implementation
K Nearest Neighbour Easily Explained with Implementation
Krish Naik
53 Predicting Heart Disease using Machine Learning
Predicting Heart Disease using Machine Learning
Krish Naik
54 Predicting Lungs Disease using Deep Learning
Predicting Lungs Disease using Deep Learning
Krish Naik
55 Stock Sentiment Analysis using News Headlines
Stock Sentiment Analysis using News Headlines
Krish Naik
56 Random Forest(Bootstrap Aggregation) Easily Explained
Random Forest(Bootstrap Aggregation) Easily Explained
Krish Naik
57 Voting Classifier(Hard Voting and Soft Voting Classifier)
Voting Classifier(Hard Voting and Soft Voting Classifier)
Krish Naik
58 Credit Card Fraud Detection using Machine Learning from Kaggle
Credit Card Fraud Detection using Machine Learning from Kaggle
Krish Naik
59 Hyperparameter Optimization for Xgboost
Hyperparameter Optimization for Xgboost
Krish Naik
60 Tutorial 45-Handling imbalanced Dataset  using python- Part 1
Tutorial 45-Handling imbalanced Dataset using python- Part 1
Krish Naik

Related Reads

📰
The engineering problem hiding inside "AI writes a book"
Building an AI-powered book writing app is a complex systems problem that requires more than just a giant prompt, and understanding the state machine of a book is crucial for success
Dev.to AI
📰
Build a Bulletproof Claude Code JSONL Parser
Learn to parse Claude Code JSONL session files using 3 battle-tested patterns, ensuring robust and reliable data extraction
Dev.to · gentic news
📰
The Secret Sauce of Apple Silicon: Why Unified Memory is a Game-Changer for AI If you’ve spent…
Learn how Apple's Unified Memory boosts AI performance, especially for large language models and generative AI, and why it's a game-changer for professionals
Medium · Machine Learning
📰
The Secret Sauce of Apple Silicon: Why Unified Memory is a Game-Changer for AI If you’ve spent…
Learn how Apple's Unified Memory boosts AI performance, especially for large language models and generative AI, and why it's a game-changer for these applications
Medium · NLP
Up next
Copilot Cowork: Setup, Skills, Plugins & Pricing
Matt Tutorials
Watch →