Matrix representation with Python standard input

I made a 3x3 matrix using standard inputs commonly used in AtCoder

Environment Python 3.7.3


import pandas as pd

s = [input().split() for  i  in range(3)]
N = pd.DataFrame(s,columns=list("123"),index=["Tokyo","Nagoya","Osaka"])
print(N)

input

9 8 7 6 5 4 3 2 1

output

image.png

Recommended Posts

Matrix representation with Python standard input
[Python] Standard input
[Python] About standard input
Standard input with time limit
[Python3] Standard input [Cheat sheet]
Python3 standard input (competition pro)
Standard input / summary / python, ruby
Receiving standard input tips @ python
Transposed matrix in Python standard
Python3 standard input for competitive programming
Input / output with Python (Python learning memo ⑤)
[For beginners] Summary of standard input in Python (with explanation)
Comply with Python coding standard PEP8
RPC completed with standard Python3 modules
Python Paiza-Various skill checks and standard input
Calculate and display standard weight with python
Python3 standard input I tried to summarize
UnicodeEncodeError struggle with standard output of python3
Create Excel file with Python + similarity matrix
Atcoder standard input set for beginners (python)
Comparison of matrix transpose speeds with Python
[Python] Add comments to standard input files
FizzBuzz with Python3
Scraping with Python
Statistics with python
Scraping with Python
Python with Go
Twilio with Python
Integrate with Python
Play with 2016-Python
AES256 with python
Tested with Python
python starts with ()
with syntax (Python)
Standard input summary
Bingo with python
[Python] Matrix operation
Zundokokiyoshi with python
Excel with Python
Microcomputer with Python
Cast with python
Read wav files with only Python standard packages
Python: Use zipfile to unzip from standard input
Competitive Pro with Python and VSCode-Simplification of standard input and automation of sample case judgment-
Serial communication with Python
Zip, unzip with python
Django 1.11 started with Python3.6
Primality test with Python
Socket communication with Python
Data analysis with python 2
Try scraping with Python.
Key input in Python
Learning Python with ChemTHEATER 03
Sequential search with Python
"Object-oriented" learning with python
Run Python with VBA
Handling yaml with python
Solve AtCoder 167 with python
Serial communication with python
[Python] Use JSON with Python
Learning Python with ChemTHEATER 05-1