df
type content
1 task buy xbox
2 task buy fruit from supermarket
3 note orange with squash\buy if cheap
4 note apple
5 task buy sunglassess
注释指的是直接在其上方的任务。如何操作df以获取以下df? 预期输出:
task comment1 comment2
1 buy xbox
2 buy fruit from supermarket orange with squash apple
buy if cheap
3 buy sunglassess
...
答案 0 :(得分:1)
使用助手 private fun openPDFFile() {
val intent = Intent("android.intent.action.GET_CONTENT")
intent.type = "application/pdf"
startActivityForResult(intent, OPERATION_CHOOSE_PDF)
}
通过将值与累积总和进行比较来按Series
获取组,按GroupBy.cumcount
获取计数器,并按DataFrame.set_index
和Series.unstack
进行整形:< / p>
task