假设我有一个看起来像这样的数据框
Line VarA VarB
345 Something abc
346 Something2 def
347 Something ghi
348 Something2 jkl
349 Something mno
350 Something2 pqr
351 Something stu
352 Something2 vwx
如何将此数据框转换为如下所示:
VarA VarB
Something abcghimnostu
Something2 defjklpqrvwx