循环遍历带有字符串的数据帧的最佳方法是什么,我想将其拆分为多行同时保留另一个值?
输入:
genres revenue
action|comedy|drama 5000
action|romance 10000
Run Code Online (Sandbox Code Playgroud)
输出:
genres revenue
action 5000
comedy 5000
drama 5000
action 10000
romance 10000
Run Code Online (Sandbox Code Playgroud)