Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

grid_data=d.iloc[index].as_matrix( ).reshape(28,28) not working

# display or plot a number.
plt.figure(figsize=(7,7))
idx = 100

grid_data = d.iloc[idx].as_matrix().reshape(28,28) # reshape from 1d to 2d pixel array
plt.imshow(grid_data, interpolation = "none", cmap = "gray")
plt.show()

print(l[idx])
Comment

PREVIOUS NEXT
Code Example
Python :: how to add trailing zeros in the number 
Python :: https://raw.githubusercontent.com/tim-yao/lighthouse-ci/d32f465bb6cda08ded4ce25c88c43a3103e4940a/.browserslistrc 
Python :: seaborn heatmap spearman correlation coefficient 
Python :: eager tensor to numpy 
Python :: how to incorportate a different language in python code 
Python :: what does alpha in plt.txt do 
Python :: explore data dataframe pandas 
Python :: numpy generlized ufunc 
Python :: python function guts 
Python :: python socket set title 
Python :: sending whatsapp message from python notebook 
Python :: Select a Column in pandas data Frame Using Brackets 
Python :: pyteal atomic transfer 
Python :: 1046 uri solution 
Python :: test a decorator python 
Python :: A Simple Class 
Python :: save media file from url python 
Python :: How to Use Sets to Remove Duplicate Items in Other Data Structures 
Python :: Display complete information about the DataFrame 
Python :: cara ambil 2 kata menggunakan phyton 
Python :: design patterns python - restrict what methods of the wrapped class to expose 
Python :: if len formula applied to a column python 
Python :: print backward number 
Python :: running setup.py install for rjsmin ... error 
Python :: Reading Excel and other Microsoft Office files 
Python :: how i make viribal inside a string in python 
Python :: how to append the items in list 
Python :: python using boolean len comparing with 
Python :: generator expression python 
Python :: looping over folder to extract zip winrar python 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =