My dataframe
looks like:
date nights rooms searches
1 2018-01-01 2 1 30
2 2018-01-01 2 2 1
3 2018-01-01 3 1 115
I need to expand date, rooms and searches columns by nights column. Rooms and searches do not change expanding by nights. Expanding date column by nights affects date column as follows:
date rooms searches
1 2018-01-01 1 30
2 2018-01-02 1 30
4 2018-01-01 2 1
5 2018-01-02 2 1
7 2018-01-01 1 115
8 2018-01-02 1 115
9 2018-01-03 1 115