在图像中,列名Number of bedrooms
有很多行,但是每8行之后,同一行重复多次。我想使用r将每8个仅列名Banyule
之后的行移到数据帧的新列中。
感谢您的期待。
这是我的示例数据
Number of Bedrooms Banyule Banyule_ Victoria Australia
1 None (includes bedsitters) 78 0.2 8768 42160
2 1 bedroom 1287 2.9 89807 363129
3 2 bedrooms 8457 19.4 370995 1481577
4 3 bedrooms 21865 50 917911 3379930
5 4 or more bedrooms 11366 26 521664 2350132
6 Number of bedrooms not stated 645 1.5 35543 143394
7 Average number of bedrooms per dwelling 3.1 -- 3 3.1
8 Average number of people per household 2.6 -- 2.6 2.6
9 Number of bedrooms Bayside (C) NA Victoria Australia
10 None (includes bedsitters) 97 0.3 8768 42160
11 1 bedroom 1054 3.2 89807 363129
12 2 bedrooms 7939 23.9 370995 1481577