Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将 SFrame 列转换为列表。
输入 :
`+---------+ | word | +---------+ | love | | loves | | easy | | perfect | | great | +---------+`
输出:
['love', 'loves', 'easy', 'perfect', 'great']
我很惊讶这个list函数给你一个错误。这对我有用:
list
import graphlab as gl sf = gl.SFrame({'fruit': ['apple', 'banana', 'pear']}) list(sf['fruit'])
回报:
['apple', 'banana', 'pear']
提示:您可以使用以下方法将其转换为数组:
arr = sf.to_numpy()