📜  如何格式化矩阵以对齐所有行python代码示例

📅  最后修改于: 2022-03-11 14:45:28.555000             🧑  作者: Mango

代码示例1
import pandas
import numpy

x = numpy.array([[85, 86, 87, 88, 89], 
                 [90, 191, 192, 93, 94], 
                 [95, 96, 97, 98, 99], 
                 [100,101,102,103,104]])

row_labels = ['Z', 'Y', 'X', 'W']
column_labels = ['A', 'B', 'C', 'D', 'E']

df = pandas.DataFrame(x, columns=column_labels, index=row_labels)