dask DataFrameでuniqueを呼び出すにはどうすればよいですか?dask DataFrameでunique()を呼び出す方法
私は定期的なパンダのデータフレームの場合と同じ方法でそれを呼び出すしようとすると、次のエラーが表示されます。
In [27]: len(np.unique(ddf[['col1','col2']].values))
AttributeError Traceback (most recent call last)
<ipython-input-27-34c0d3097aab> in <module>()
----> 1 len(np.unique(ddf[['col1','col2']].values))
/dir/anaconda2/lib/python2.7/site-packages/dask/dataframe/core.pyc in __getattr__(self, key)
1924 return self._constructor_sliced(merge(self.dask, dsk), name,
1925 meta, self.divisions)
-> 1926 raise AttributeError("'DataFrame' object has no attribute %r" % key)
1927
1928 def __dir__(self):
AttributeError: 'DataFrame' object has no attribute 'values'
ウィルない 'lenは(np.unique(DDF [[ 'COL1' 'col2に']]))'自体にdrop_duplicatesメソッドを使用する必要があります作業? –
これは、 'np.unique(ddf [['col1'、 'col2']))'の出力が '配列([dd.DataFrame]、dtype = object) ' –
femibyte
欲しい結果は何ですか?複製された行を2列のサブセットで削除しますか? – thebeancounter