Seaborn: Import seaborn as ??

Created on 30 Jun 2014  路  11Comments  路  Source: mwaskom/seaborn

Not an issue, just a question from an enthusiastic user. You seem to like

import seaborn as sns

as your import style. When you type that, what is the voice in your head saying out loud? I had generally been importing as sbn since it "sounded right".

docs question

Most helpful comment

All kidding aside, I think that's a very reasonable point. I suppose I prefer sbn since it doesn't require people to "get the joke" even if the joke is documented. But I'm a team player, so I will probably just confirm my code to whatever consensus seems to be.

All 11 comments

I just say the letters, usually.

Hah, sorry, I should have been clearer: is sns an acronym for something? I.e. why did you pick sns and not sea or sbn or sbrn? For most packages, I understand why people picked the import conventions they picked, but this one was always a (small) mystery to me.

Ah, it's a very inside joke that you might find funny if you get the origin of the package name :)

Norman?

:+1:

While I think that this is funny I think this should be mentioned somewhere. For code readability, module abbreviations should be consistent and I think people would more readily use sns if they knew why :).

All kidding aside, I think that's a very reasonable point. I suppose I prefer sbn since it doesn't require people to "get the joke" even if the joke is documented. But I'm a team player, so I will probably just confirm my code to whatever consensus seems to be.

Eh, it's used very consistently throughout the docs, and anywhere I've used it on the internet (stackoverflow, gists, etc.). If people want to be nonconformist, they're not likely to be swayed otherwise by the fact that there's a silly reason behind the "official" abbreviation.

(Also there's not really an obvious place in the docs to do it, since I don't think there's a single point of entry aside from the homepage and intro which are higher-level. Maybe on "installing and getting started"?).

I think the "installing and getting started" idea is right on. Keep it an inside joke, or link to an explain. But something to the effect of "typical import syntax is import seaborn as sns".

Closed with #265

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rrbarbosa picture rrbarbosa  路  3Comments

sungshine picture sungshine  路  3Comments

alexpetralia picture alexpetralia  路  3Comments

vinay-jayaram picture vinay-jayaram  路  3Comments

Bercio picture Bercio  路  3Comments