0

I have a dataframe, which contains following records:

enter image description here

I need to fill this dataframe with rows with dates which are not present in it. After inserting new dates the timestamp column should be in range df.timestamp.iloc[0] and df.timestamp.iloc[0]

phileinSophos
  • 362
  • 4
  • 22
  • 1
    Can you post the `dataframe`/`dict` instead of an `image`? you can use `df.head(10).to_dict()`?? – Nk03 Jun 28 '21 at 10:55
  • Please [do not post images](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question) of your data. You can include [code that creates a dataframe or the output of `print(df)`](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) (or of a few rows and columns that allow to reproduce the example) – Cimbali Jun 28 '21 at 12:11
  • It could also be useful to show an example of the output you want to achieve – Cimbali Jun 28 '21 at 12:12

1 Answers1

0

You can use relativedelta() along with split() from the datetime library

starlord
  • 135
  • 9