问答交流

【代码报错】ArrowInvalid: 没有访问 "_337e3530e87a4dc6b0649919ae791200" 的权限

由bq4n08z8创建,最终由small_q 被浏览 18 用户

DataSource apply_bdb 修改无权限提示

def fillna_to_zero(df):
    return df.fillna(0)
m3.data.apply_bdb(func=fillna_to_zero, as_type=pd.DataFrame)

:::warning

您可以去社区论坛问答交流板块反馈咨询 去发帖>>

ArrowInvalid Traceback (most recent call last)

Cell In[4], line 3

     1 def fillna_to_zero(df): 

     2     return df.fillna(0) 

----> 3 m3.data.apply_bdb(func=fillna_to_zero, as_type=pd.DataFrame)

File /var/app/enabled/dai/_datasource.py:919, in apply_bdb(self, func, as_type, partition_filter, timeout, preserve_order, **kwargs)

File /var/app/enabled/dai/_dataformats/bdb.py:786, in apply_bdb(self, func, datasource_storage, as_type, partition_filter, preserve_order)

File /var/app/enabled/dai/_dataformats/bdb.py:619, in _prepare_write_table(self, table, path_i, indexes, sort_by, preserve_pandas_index, unique_together, on_duplicates, overwrite, preserve_order)

File /var/app/enabled/dai/_storage/data.py:35, in new_func(*args, **kwargs)

File /var/app/enabled/dai/_storage/data.py:261, in write_dataset(self, data, path_i, format, preserve_order, **kwargs)

File /opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/pyarrow/dataset.py:1009, in write_dataset(data, base_dir, basename_template, format, partitioning, partitioning_flavor, schema, filesystem, file_options, use_threads, max_partitions, max_open_files, max_rows_per_file, min_rows_per_group, max_rows_per_group, file_visitor, existing_data_behavior, create_dir) 1006 raise ValueError("Cannot specify a schema when writing a Scanner") 1007 scanner = data -> 1009 _filesystemdataset_write( 1010 scanner, base_dir, basename_template, filesystem, partitioning, 1011 file_options, max_partitions, file_visitor, existing_data_behavior, 1012 max_open_files, max_rows_per_file, 1013 min_rows_per_group, max_rows_per_group, create_dir 1014 )

File /opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/pyarrow/_dataset.pyx:3844, in pyarrow._dataset._filesystemdataset_write()

File /opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/pyarrow/error.pxi:100, in pyarrow.lib.check_status()

ArrowInvalid: 没有访问 "_337e3530e87a4dc6b0649919ae791200" 的权限

:::

\

标签

数据处理
评论
  • 缓存数据是没有修改权限的,建议您可以将数据抽出来用pandas操作:m3.data.read().fillna(0)
{link}