Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Seaborn - Why import as sns?

Tags:

python

seaborn

Why do you always import seaborn as sns and not with the letters of the name as sbn?

Is sns an acronym for something?

Or is it some kind of joke?

EDIT:

As cel commented, someone put this as an issue in github.
There they do not answer the question but say that it is a joke related to the original name of the library.
I was unsuccessful in trying to find that original name.

like image 287
Lucas Avatar asked Jan 06 '17 06:01

Lucas


People also ask

What does import seaborn as SNS mean?

The import seaborn portion of the code tells Python to bring the Seaborn library into your current environment. The as sns portion of the code then tells Python to give Seaborn the alias of sns. This allows you to use Seaborn functions by simply typing sns.

Why do we import seaborn library?

Seaborn is a library for making statistical graphics in Python. It builds on top of matplotlib and integrates closely with pandas data structures. Seaborn helps you explore and understand your data.

How do I import to seaborn library?

To get started with seaborn, you're going to need to install it in the terminal with either pip install seaborn or conda install seaborn . Then simply include import seaborn as sns at the top of your python file.

Is seaborn a library or package?

Seaborn is a library that uses Matplotlib underneath to plot graphs. It will be used to visualize random distributions.


1 Answers

Samuel Norman "Sam" Seaborn is a fictional character portrayed by Rob Lowe on the television serial drama The West Wing.

So, it's a joked initialism.

like image 158
boardrider Avatar answered Sep 23 '22 05:09

boardrider