When I run the following script on my macbookpro, I see that 8 threads are spawn. Similar behavior (opening multiple threads) happens on my centos servers.

import time
import pandas
print 'aaa'
time.sleep(30)

I would expect pandas as a pure computing library will only use 1 thread automatically, not 8 (my mac has 4 cores). Wondering if this is a bug.

The output of pd.show_versions() is:

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Darwin
OS-release: 16.3.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LOCALE: None.None

pandas: 0.19.1
nose: 1.3.7
pip: 9.0.1
setuptools: 28.8.0
Cython: 0.25.1
numpy: 1.11.2
scipy: 0.18.1
statsmodels: 0.6.1
xarray: None
IPython: 5.1.0
sphinx: 1.4.8
patsy: None
dateutil: 2.6.0
pytz: 2016.7
blosc: None
bottleneck: None
tables: 3.3.0
numexpr: 2.6.1
matplotlib: 1.5.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None

Comment From: jreback

This is as expected. numexpr spawns a threadpool on startup, see the docs here: https://github.com/pydata/numexpr/wiki/Numexpr-Users-Guide

(py2.7) bash-3.2$ python
Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:43:17) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import numexpr
>>> numexpr.set_num_threads(1)
8
>>> import pandas

pandas does not directly use threading

and to be honest, this shouldn't matter at all, except for better performance, as the implementation is almost always irrelevant to the user (exception would be a library that spawns multiple computations, eg. dask. though pandas does play nice)