If you have read some of my previous blogs, you may have noticed that I’m a big fan of low-code libraries. That’s not because I’m lazy to type code but because I prefer investing my time working on a project with what really matters. If a library can solve a problem, why not save your precious time and give it a try? Today, I will introduce you to 5 libraries that you probably have never heard about but you should add to your pipeline. Let’s get started!
When you start typing your code for a project, what is your first step? You probably import the libraries you will need, right? The problem is that you never know how many libraries you will need until you need it and get an error. That’s why PyForest is one of the handiest libraries that I know. PyForest can import the 40 most popular libraries to your notebook with one line of code. Forget about trying to remember how to call each library. PyForest can do that for you. I have written a whole blog about it, but in short, you install it, call it, and use it! All that in a few seconds. How about the aliases? Don’t worry about it. They will be imported with the aliases that we are familiar with.
How to use it
Just type and you are good to go. To import it to your notebook, type from
and you can start using your libraries. To check which libraries were imported, type.
All the libraries above are good to use. Technically, they will only be imported if you use them. Otherwise, they will not. You can see libraries such as Pandas, Matplotlib, Seaborn, Tensorflow, Sklearn, NLTK, XGBoost, Plotly, Keras, Numpy, and many others.
Emot is a nice-to-have library that has the potential to improve by a lot your next NLP project. It transforms emojis and emoticons into descriptive information. For example, imagine that someone posted “I ❤️ Python” on Twitter. The person didn’t say the word love. Instead, they used an emoji. If you use this tweet in an NLP project, you will have to remove the emoji and lose a big piece of information. That's when Emot comes in. It transforms emojis and emoticons into words. For those who are not familiar, emoticons are ways to express sentiments using characters.
How to use
To install it, you can type, and you are good to go. Then you will need to import it into your notebook by typing. You will need to decide if you want to figure out the meaning of emojis or emoticons. For emojis, the code is. Let's check it out with an example:
You can see above that I added the sentence I ❤️ Python ?
and used Emot to figure it out. It returned a dictionary with the values, the description, and the location. Like any dictionary, you can slice it and focus on the information that you need. If I type ans['mean']
, it will return only the emoji description.
I'm including Geemap to this list, but to be honest, it deserves an entire blog about it. In short, Geemap is a Python library that allows interactive mapping with Google Earth Engine. You are probably familiar with Google Earth and all its power, so why not use it for your next project? I'm planning to create a project to explore all its functionalities in the next few weeks. In the meantime, here is how you can install and start using it.
How to use it
You can install it by typing pip install geemap
in your Terminal. To import it to your notebook, you can type import geemap
. For demonstration purposes, I will create a folium-based interactive map using the following code
I learned about Dabl yesterday, and after doing some research, I found out that it deserves its own blog, but let's cover the basics. Dabl aims to make machine learning modeling more accessible for beginners. For this reason, it uses low-code solutions for machine learning projects. Dabl simplifies data cleaning, creating visualizations, building baseline models, and explaining models. Let's quickly review some of its functionalities.
How to use
First, to install it, you can just tyYou can use to get information about features, such as if there is any useless features. It also shows continuous, categorical, and high-cardinality features.
You can use (data)
to generate visualizations about a specific feature:
And finally, you can create multiple models with one line of code using ()
just like you would do using Scikit-Learn. However, in this step, you will have to take some of the steps you would usually take, such as creating training and testing dataset, calling, fitting and predicting the model. Then, you can use Scikit-Learn to evaluate the model.
As we can see, Dabl iterated through multiple models, including Dummy Classifier, GaussianNB, Decision Trees with different depths, and Logistic Regression. At the end, it shows the best model. All these models in about 10 seconds. Cool, right? I decided to test the final model using Scikit-Learn to make sure that this result was trustworthy. Here is the result:
I got 0.968 accuracy using the conventional way to predict and 0.971 with Dabl. That's close enough for me! Note that I didn't have to import the Logistic Regression model from the Scikit-Learn library because it was already imported with PyForest. I need to confess that I prefer LazyPredict, but Dabl is worth trying. There is much more to show about Dabl, and I will work on a blog exclusively for it with more details. Stay tuned!
Sweetviz is a low-code Python library that generates beautiful visualizations to kickstart your exploratory data analysis with two lines of code. The output is an interactive HTML file. Like other libraries that I mentioned today, SweetViz deserves its own blog, and I will publish one soon. For now, let’s get a high overview of it.
How to use it
Did you see that? Sweetviz was able to create an EDA HTML file with information about the entire dataset and break it down so that you can analyze each feature individually. You can get the numerical and categorical association to other features, largest, smallest, and most frequent values. The visualization also changes depending on the data type. You can do so much more with Sweetviz, but I will keep it for another blog. In the meantime, I highly recommend you trying it out.
PyForest, Emot, Geemap, Dabl, and Sweetviz are libraries that deserve to be known because it turns complicated tasks into straightforward ones. If you use these libraries, you will save your precious time with tasks that matter.
I recommend you try them out and explore their functionalities that I didn’t mention here. If you do, let me know what you found out about them. You can find the notebook I used to test them in my GitHub. Thank you for reading!
- In this blog post here discussed the best ways to install WordPress on your Windows 10 PC or laptop
- whats more, a private helipad. Examining excess, the housing features an engaging wellspring
- Entertainment often leaves us delighted and content. Not only does it help one to spend their leisure time relaxed
- A Digital Agency is a company that creates websites, apps, and software for businesses. They work to improve an