我有一个包含几个dask系列的列表。每个系列都是布尔型的,长度相同。这里有三个元素的摘录,只是为了展示它们。
[Dask Series Structure:
npartitions=15
bool
...
...
...
...
Name: Sequence, dtype: bool
Dask Name: eq, 75 tasks, Dask Series Structure:
npartitions=15
bool
...
...
...
...
Name: Sequence, dtype: bool
Dask Name: eq, 75 tasks, Dask Series Structure:
npartitions=15
bool
...
...
...
...
Name: Sequence, dtype: bool
Dask Name: eq, 75 tasks]我将这个列表转换为一个dask DataFrame,每个系列都表示一个不同的列。我是用dd.concat(List_of_series, axis=1, interleave_partitions=True)做的。
该命令可以工作,但我得到了以下UserWarning
/home/schmat/.local/lib/python3.6/site-packages/dask/dataframe/multi.py:1056: UserWarning: Concatenating dataframes with unknown divisions.
We're assuming that the indexes of each dataframes are
aligned. This assumption is not generally safe.
"Concatenating dataframes with unknown divisions.\n"我怎样才能摆脱这个警告?当我compute()它时,产生的连接正是我想要的。
发布于 2022-05-31 12:24:22
如果您只想禁用警告,可以使用ignore_unknown_divisions=True
有关更多信息,请查看文档:https://docs.dask.org/en/latest/generated/dask.dataframe.multi.concat.html
https://stackoverflow.com/questions/60884183
复制相似问题