converting appended images list in Pandas dataframe
<p>I have a list which I created after appending the images from a folder </p>

<pre><code>samples=[]    
for filename in glob.glob(path + '/*.png'):
    samples.append(misc.imread(filename))
</code></pre>

<p>And a sample of the list looks like </p>

<pre><code>[array([[ 4,  4,  4, ...,  5,  5,  4],
   [ 5,  5,  5, ...,  6,  6,  5],
   [ 5,  5,  5, ...,  6,  6,  4],
   ..., 
   [12, 12, 11, ..., 12, 12,  7],
   [12, 11, 11, ..., 13, 12,  7],
   [11, 11, 10, ..., 12, 12,  7]], dtype=uint8), array([[ 4,  4,  4, ...,  7,  7,  6],
   [ 5,  5,  5, ...,  6,  6,  4],
   [ 5,  5,  5, ...,  7,  7,  5]], dtype=uint8)]
</code></pre>

<p>How it convert the image's dimensions in a Pandas DataFrame. when I tried to do it with </p>

<pre><code>df=pd.DataFrame(samples)
</code></pre>

<p>It gives me an error </p>

<pre><code>ValueError: Must pass 2-d input
</code></pre>

<p>Please Suggest- I will appreciate every help</p>

<p>Try converting it into a pandas <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Panel.html" rel="nofollow">panel</a></p>

<pre><code>import cv2
img = cv2.imread('path/Picture_1.png')
imgPanel = pd.Panel(img)
</code></pre>

<p>For more info see: <a href="http://pandas-docs.github.io/pandas-docs-travis/dsintro.html#panel" rel="nofollow">Panel- Introduction</a>, <a href="http://pandas-docs.github.io/pandas-docs-travis/whatsnew.html#n-dimensional-panels-experimental" rel="nofollow">n-dimensional Panel (Experimental)</a>, <a href="http://pandas-docs.github.io/pandas-docs-travis/cookbook.html#panels" rel="nofollow">Cookbook- Panel</a>, <a href="http://pandas-docs.github.io/pandas-docs-travis/cookbook.html#panelnd" rel="nofollow">Panel-nd cookbook</a></p>

python pandas dataframe scipy