<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
#coding=utf-8
from django.forms.models import model_to_dict  
from django.db import connection
import os,sys
import time,datetime
from .models import RegistrationTable
import pandas as pd

def insert_db(data,SupplierPaymentDict,company_name,chinese_name):
    return 0
"><pre class="notranslate"><span class="pl-c">#coding=utf-8</span>
<span class="pl-k">from</span> <span class="pl-s1">django</span>.<span class="pl-s1">forms</span>.<span class="pl-s1">models</span> <span class="pl-k">import</span> <span class="pl-s1">model_to_dict</span>  
<span class="pl-k">from</span> <span class="pl-s1">django</span>.<span class="pl-s1">db</span> <span class="pl-k">import</span> <span class="pl-s1">connection</span>
<span class="pl-k">import</span> <span class="pl-s1">os</span>,<span class="pl-s1">sys</span>
<span class="pl-k">import</span> <span class="pl-s1">time</span>,<span class="pl-s1">datetime</span>
<span class="pl-k">from</span> .<span class="pl-s1">models</span> <span class="pl-k">import</span> <span class="pl-v">RegistrationTable</span>
<span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>

<span class="pl-k">def</span> <span class="pl-en">insert_db</span>(<span class="pl-s1">data</span>,<span class="pl-v">SupplierPaymentDict</span>,<span class="pl-s1">company_name</span>,<span class="pl-s1">chinese_name</span>):
    <span class="pl-k">return</span> <span class="pl-c1">0</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">if i import pandas 0.19.2 into the programe ，only type<br>
import pandas  will make the error。<br>
the error is ，if i use mod_wsgi4.4+apache2.4+django1.10.4 to run a website，i will got “127.0.0.1 is respording”，but if i use django‘runserver  like “ python manage.py runserver "，it will work well。</p>
<p dir="auto">but if i roll back to 0.18.0，all is ok</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
# Paste the output here pd.show_versions() here
&gt;&gt;&gt; pandas.show_versions()
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 2.7.13.final.0<br>
python-bits: 32<br>
OS: Windows<br>
OS-release: 7<br>
machine: AMD64<br>
processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: None<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.19.2<br>
nose: 1.3.7<br>
pip: 9.0.1<br>
setuptools: 27.2.0<br>
Cython: 0.25.2<br>
numpy: 1.12.0<br>
scipy: 0.18.1<br>
statsmodels: 0.6.1<br>
xarray: None<br>
IPython: 5.1.0<br>
sphinx: 1.5.1<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2016.10<br>
blosc: None<br>
bottleneck: 1.2.0<br>
tables: 3.2.2<br>
numexpr: 2.6.1<br>
matplotlib: 2.0.0<br>
openpyxl: 2.4.1<br>
xlrd: 1.0.0<br>
xlwt: 1.2.0<br>
xlsxwriter: 0.9.6<br>
lxml: 3.7.2<br>
bs4: 4.5.3<br>
html5lib: None<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: 1.1.5<br>
pymysql: 0.7.9.None<br>
psycopg2: None<br>
jinja2: 2.9.4<br>
boto: 2.45.0<br>
pandas_datareader: None</p>
</details>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd
import numpy as np

data = np.random.randn(5, 100, 5)
panel = pd.Panel(data, items=list(&quot;AACDE&quot;))

panel.iloc[0] # ValueError: Wrong number of dimensions

fr = panel.loc[&quot;E&quot;]
fr.values.shape # (5, 100, 5) wrong"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>

<span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randn</span>(<span class="pl-c1">5</span>, <span class="pl-c1">100</span>, <span class="pl-c1">5</span>)
<span class="pl-s1">panel</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Panel</span>(<span class="pl-s1">data</span>, <span class="pl-s1">items</span><span class="pl-c1">=</span><span class="pl-en">list</span>(<span class="pl-s">"AACDE"</span>))

<span class="pl-s1">panel</span>.<span class="pl-s1">iloc</span>[<span class="pl-c1">0</span>] <span class="pl-c"># ValueError: Wrong number of dimensions</span>

<span class="pl-s1">fr</span> <span class="pl-c1">=</span> <span class="pl-s1">panel</span>.<span class="pl-s1">loc</span>[<span class="pl-s">"E"</span>]
<span class="pl-s1">fr</span>.<span class="pl-s1">values</span>.<span class="pl-s1">shape</span> <span class="pl-c"># (5, 100, 5) wrong</span></pre></div>
<p dir="auto">So this is another contrived example that I got from just running a battery of tests on random objects. Basically having a duplicate item key will bork the <code class="notranslate">Panel</code>.</p>
<p dir="auto">I'm actually not sure whether Panel is meant to be a collection of uniquely identified DataFrames, or more like a generic 3d container that has convenient semantics for its axes. I think at one point it was the former, but as more things pull from generic it's becoming the later?</p>