1798 1799 1800 781 782 783转dataframe并且将列名命名为A并设置A为索引列
import pandas as pd
arr = [1798, 1799, 1800, 780, 781, 782, 783] df = pd.DataFrame(arr, columns=['A']) df = df.set_index('A') print(df)
原文地址: https://www.cveoy.top/t/topic/fG6U 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
import pandas as pd
arr = [1798, 1799, 1800, 780, 781, 782, 783] df = pd.DataFrame(arr, columns=['A']) df = df.set_index('A') print(df)
原文地址: https://www.cveoy.top/t/topic/fG6U 著作权归作者所有。请勿转载和采集!