Skip to main content
 首页 » 编程设计

python之从 Dataframe 中删除方括号

2024年09月07日9lovecherry

<分区>

我有 Following as adtaset in dataframe format ,我需要从数据中删除方括号。我们该如何进行,谁能帮忙

   From             TO 
   [wrestle]        engage in a wrestling match 
   [write]          communicate or express by writing 
   [write]          publish 
   [spell]          write 
   [compose]        write music 

预期输出是:

   From             TO 
   wrestle      engage in a wrestling match 
   write       communicate or express by writing 
   write       publish 
   spell       write