<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#Using pandas 0.19.2
import pandas as pd, pickle
arr= np.ones((5,5))
col= [  r'統合商C', r'統合商名', r'区分', r'H区分名' ,  r'H区'  ]
df= pd.DataFrame(arr, columns=col)

with open( 'df_pandas_192.pkl', 'wb') as f:
        pickle.dump(df, f, pickle.HIGHEST_PROTOCOL)

# Using pandas 0.20.1
import pickle
with open('df_pandas_192.pkl', 'rb') as f:
    df= pickle.load(f)
"><pre class="notranslate"><code class="notranslate">#Using pandas 0.19.2
import pandas as pd, pickle
arr= np.ones((5,5))
col= [  r'統合商C', r'統合商名', r'区分', r'H区分名' ,  r'H区'  ]
df= pd.DataFrame(arr, columns=col)

with open( 'df_pandas_192.pkl', 'wb') as f:
        pickle.dump(df, f, pickle.HIGHEST_PROTOCOL)

# Using pandas 0.20.1
import pickle
with open('df_pandas_192.pkl', 'rb') as f:
    df= pickle.load(f)

</code></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">We have an issue due to module breaks<br>
(probably dataframe class has been changed in 0.20.1)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/home/ubuntu/project27//aapackage/util_min.py in py_load_obj(folder, isabsolutpath, encoding1)
    485        dir1= folder
    486 
--&gt; 487     with open(dir1, 'rb') as f:
    488         return pickle.load(f)
    489 
    ModuleNotFoundError: No module named 'pandas.indexes'
"><pre class="notranslate"><code class="notranslate">/home/ubuntu/project27//aapackage/util_min.py in py_load_obj(folder, isabsolutpath, encoding1)
    485        dir1= folder
    486 
--&gt; 487     with open(dir1, 'rb') as f:
    488         return pickle.load(f)
    489 
    ModuleNotFoundError: No module named 'pandas.indexes'

</code></pre></div>
<h4 dir="auto">Expected Output</h4>
<h4 dir="auto">Pickle serialized with this version  <code class="notranslate">pd.show_versions()</code></h4>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 2.7.12.final.0<br>
python-bits: 64<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: en_US<br>
LOCALE: None.None<br>
pandas: 0.19.2<br>
nose: 1.3.7<br>
pip: 8.1.2<br>
setuptools: 23.0.0<br>
Cython: 0.24<br>
numpy: 1.11.1<br>
scipy: 0.18.0<br>
statsmodels: 0.8.0<br>
xarray: None<br>
IPython: 4.2.0<br>
sphinx: 1.4.1<br>
patsy: 0.4.1<br>
dateutil: 2.5.3<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: 1.1.0<br>
tables: 3.4.2<br>
numexpr: 2.6.0<br>
matplotlib: 1.5.1<br>
openpyxl: 2.3.2<br>
xlrd: 1.0.0<br>
xlwt: 1.1.2<br>
xlsxwriter: 0.9.2<br>
lxml: 3.6.0<br>
bs4: 4.4.1<br>
html5lib: None<br>
httplib2: 0.10.3<br>
apiclient: 1.6.2<br>
sqlalchemy: 1.0.13<br>
pymysql: 0.7.9.None<br>
psycopg2: 2.6.2 (dt dec pq3 ext lo64)<br>
jinja2: 2.8<br>
boto: 2.40.0<br>
pandas_datareader: None</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.1.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-1031-aws
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
<p dir="auto">pandas: 0.20.1<br>
pytest: 3.0.7<br>
pip: 9.0.1<br>
setuptools: 27.2.0<br>
Cython: 0.25.2<br>
numpy: 1.12.1<br>
scipy: 0.19.0<br>
xarray: None<br>
IPython: 5.3.0<br>
sphinx: 1.5.6<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: 1.2.1<br>
tables: 3.3.0<br>
numexpr: 2.6.2<br>
feather: None<br>
matplotlib: 2.0.2<br>
openpyxl: 2.4.7<br>
xlrd: 1.0.0<br>
xlwt: 1.2.0<br>
xlsxwriter: 0.9.6<br>
lxml: 3.7.3<br>
bs4: 4.6.0<br>
html5lib: 0.9999999<br>
sqlalchemy: 1.1.9<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.6<br>
s3fs: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>
<p dir="auto">An example from<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="321402615" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/20986" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/20986/hovercard?comment_id=436065299&amp;comment_type=issue_comment" href="https://github.com/pandas-dev/pandas/issues/20986#issuecomment-436065299">#20986 (comment)</a></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from io import StringIO
from pandas import concat, DataFrame, read_table

buffer = StringIO(&quot;&quot;&quot;\
study	SRP052491	SRP052491
run	SRR1762738	SRR1762739
gene_id		
ENSG00000000003.14	16641	11561\
&quot;&quot;&quot;)
expressions = read_table(buffer, header=[0, 1], index_col=[0])
third_index = DataFrame({'third_index': ['Disease X', 'Disease Y']}).T

concat([expressions, third_index], ignore_index=True)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">io</span> <span class="pl-k">import</span> <span class="pl-v">StringIO</span>
<span class="pl-k">from</span> <span class="pl-s1">pandas</span> <span class="pl-k">import</span> <span class="pl-s1">concat</span>, <span class="pl-v">DataFrame</span>, <span class="pl-s1">read_table</span>

<span class="pl-s1">buffer</span> <span class="pl-c1">=</span> <span class="pl-v">StringIO</span>(<span class="pl-s">"""<span class="pl-cce">\</span></span>
<span class="pl-s"><span class="pl-cce"></span>study	SRP052491	SRP052491</span>
<span class="pl-s">run	SRR1762738	SRR1762739</span>
<span class="pl-s">gene_id		</span>
<span class="pl-s">ENSG00000000003.14	16641	11561<span class="pl-cce">\</span></span>
<span class="pl-s"><span class="pl-cce"></span>"""</span>)
<span class="pl-s1">expressions</span> <span class="pl-c1">=</span> <span class="pl-en">read_table</span>(<span class="pl-s1">buffer</span>, <span class="pl-s1">header</span><span class="pl-c1">=</span>[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>], <span class="pl-s1">index_col</span><span class="pl-c1">=</span>[<span class="pl-c1">0</span>])
<span class="pl-s1">third_index</span> <span class="pl-c1">=</span> <span class="pl-v">DataFrame</span>({<span class="pl-s">'third_index'</span>: [<span class="pl-s">'Disease X'</span>, <span class="pl-s">'Disease Y'</span>]}).<span class="pl-v">T</span>

<span class="pl-en">concat</span>([<span class="pl-s1">expressions</span>, <span class="pl-s1">third_index</span>], <span class="pl-s1">ignore_index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</pre></div>
<hr>
<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="# Your code here
a=raw_data.groupby(['Year','Month'])['Event_Count','Holiday_Count'].sum() --&gt;shape=81,2
intermediate=raw_data[['Year','Month']].drop_duplicates() --&gt; shape=81,2
raw_data=pd.concat([a,intermediate],ignore_index=True,axis=1)

Pandas version : '0.20.3'
python version : 3.6.3"><pre class="notranslate"><span class="pl-c"># Your code here</span>
<span class="pl-s1">a</span><span class="pl-c1">=</span><span class="pl-s1">raw_data</span>.<span class="pl-en">groupby</span>([<span class="pl-s">'Year'</span>,<span class="pl-s">'Month'</span>])[<span class="pl-s">'Event_Count'</span>,<span class="pl-s">'Holiday_Count'</span>].<span class="pl-en">sum</span>() <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span><span class="pl-s1">shape</span><span class="pl-c1">=</span><span class="pl-c1">81</span>,<span class="pl-c1">2</span>
<span class="pl-s1">intermediate</span><span class="pl-c1">=</span><span class="pl-s1">raw_data</span>[[<span class="pl-s">'Year'</span>,<span class="pl-s">'Month'</span>]].<span class="pl-en">drop_duplicates</span>() <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-s1">shape</span><span class="pl-c1">=</span><span class="pl-c1">81</span>,<span class="pl-c1">2</span>
<span class="pl-s1">raw_data</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-en">concat</span>([<span class="pl-s1">a</span>,<span class="pl-s1">intermediate</span>],<span class="pl-s1">ignore_index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,<span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)

<span class="pl-v">Pandas</span> <span class="pl-s1">version</span> : <span class="pl-s">'0.20.3'</span>
<span class="pl-s1">python</span> <span class="pl-s1">version</span> : <span class="pl-c1">3.6</span>.<span class="pl-c1">3</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">when i am truing to concat two dataframe with same dimension  i am getting below error<br>
Buffer dtype mismatch, expected 'Python object' but got 'long long'<br>
[this should explain <strong>why</strong> the current behaviour is a problem and why the expected output is a better solution.]</p>
<p dir="auto"><strong>Note</strong>: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!</p>
<p dir="auto"><strong>Note</strong>: Many problems can be resolved by simply upgrading <code class="notranslate">pandas</code> to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if <code class="notranslate">master</code> addresses this issue, but that is not necessary.</p>
<p dir="auto">For documentation-related issues, you can check the latest versions of the docs on <code class="notranslate">master</code> here:</p>
<p dir="auto"><a href="https://pandas-docs.github.io/pandas-docs-travis/" rel="nofollow">https://pandas-docs.github.io/pandas-docs-travis/</a></p>
<p dir="auto">If the issue has not been resolved there, go ahead and file it in the issue tracker.</p>
<h4 dir="auto">Expected Output</h4>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<p dir="auto">[paste the output of <code class="notranslate">pd.show_versions()</code> here below this line]</p>
</details>