我可以将熊猫数据帧导入matlab,但我无法访问它的数据。我知道我可以将dataframe作为python字典导入,它可以工作,但是我想将其作为python dataframe导入,并对其进行操作或将其转换为数据集或单元格数组
at = py.dat_tests.get_athletes() %Imports the dataframe
def get_athletes():
a_dict = {'Name' : ['Fred', 'Nick', 'Joe', 'Max'], 'Favorite Sport' : ['Baseball', 'Hockey', 'Handball', 'Basketball'], 'Wins' : [25, 19, 15, 45]}
dataframe = pd.DataFrame(data=a_dict)
print(dataframe)
# Returning athletes as a python dictionary works...
athletes = dataframe.to_dict()
return dataframe
来自非单元格数组对象的单元格内容引用
目前没有回答
相关问题 更多 >
编程相关推荐