Installing XGBoost and pandas_profiling in MacOS
IInstalling xgboost and pandas_profiling in MacOS
Why are we writing this article to install a simple library?
It’s because there is a high probability that you will face issues while importing xgboost in your Jupyter notebook on a MacOS. You will come across a lot of tutorial videos, stackoverflow, and what not.
Chances are that you might waste a lot of time in just importing the library let alone working on it
Installing xgboost and pandas_profiling in MacOS
Posting this blog 3:00 in the morning, because we understand the pain and frustration it cause to deal with errors which are not even worth investing time
I will tell you what all things I tried, and then you can try it in your system. If everything goes well then you might thank me in the comment box π
The first error which I got was ‘OpenMP runtime is not installed’
Solution – Open a new workbook in Jupyter and run the command ‘brew install libomp‘
It will take some time to run, once it is installed. Restart the Kernel
This is essential(at least I tried this), but again when I tried to import xgboost there was another error. This time around there was error of some other dependency. Tried multiple things.
Below is the final thing which helped.
Shut your Jupyter notebook. Close Anaconda.
Open the terminal and write ‘conda install -c conda-forge xgboost‘ (No specific path needed to run this command.
Reopen Anaconda, Launch Jupyter and try ‘import xgboost as xgb’
If the force is with you then it will be imported. Else, google, youtube,Stackoverflow !!
This video helped a lot
Bonus tip
Use the below command in your notebook
pip install pandas-profiling
This will install pandas_profiling package.
What is Panda_profiling?
import pandas_profiling
report = pandas_profiling.ProfileReport(train)
report
train is your training dataset. This above command will give you a complete overview of the dataset. There are many more information than the screenshot give below
Bonus tip 2.0 – The command will take at least 8-10 minutes to summarize the data and your laptop might heat up π
The Data Monk Interview Books β Donβt Miss
Now we are also available on our website where you can directly download the PDF of the topic you are interested in. At Amazon, each book costs ~299, on our website we have put it at a 60-80% discount. There are ~4000 solved interview questions prepared for you.
10 e-book bundle with 1400 interview questions spread across SQL, Python, Statistics, Case Studies, and Machine Learning Algorithms β Ideal for 0-3 years experienced candidates
23 E-book with ~2000 interview questions spread across AWS, SQL, Python, 10+ ML algorithms, MS Excel, and Case Studies β Complete Package for someone between 0 to 8 years of experience (The above 10 e-book bundle has a completely different set of e-books)
12 E-books for 12 Machine Learning algorithms with 1000+ interview questions β For those candidates who want to include any Machine Learning Algorithm in their resume and to learn/revise the important concepts. These 12 e-books are a part of the 23 e-book package
Individual 50+ e-books on separate topics
Important Resources to crack interviews (Mostly Free)
There are a few things which might be very useful for your preparation
The Data Monk Youtube channel β Here you will get only those videos that are asked in interviews for Data Analysts, Data Scientists, Machine Learning Engineers, Business Intelligence Engineers, Analytics Manager, etc.
Go through the watchlist which makes you uncomfortable:-
All the list of 200 videos
Complete Python Playlist for Data Science
Company-wise Data Science Interview Questions β Must Watch
All important Machine Learning Algorithm with code in Python
Complete Python Numpy Playlist
Complete Python Pandas Playlist
SQL Complete Playlist
Case Study and Guesstimates Complete Playlist
Complete Playlist of Statistics
‘