Hello,
below is a sample from my data
issue_id rating_date rating
1 26/05/1993 Baa3
1 23/01/1997 Baa2
2 13/10/1993 Baa3
2 23/01/1997 Baa2
4 26/07/1994 Aa3
4 26/11/1996 Aa2
4 08/07/1998 Aa3
4 08/12/1998 Aa2
4 27/08/1999 Aa3
5 20/05/1993 Aa2
5 26/11/1996 Aa2
5 08/07/1998 Aa2
5 08/12/1998 Aa3
5 27/08/1999 Aa3
6 13/10/1993 Aa2
6 26/11/1996 Aa2
6 08/07/1998 Aa2
6 08/12/1998 Aa3
6 27/08/1999 Aa3
I have the following data. However, I need the rating to be in a time interval, i.e I want to add two columns FromDate and ToDate. Consequently , for issue_id 4 for example FromDate and Todate Should be the following:
FromDate ToDate Rating
26/07/1994 26/11/1996 Aa3
26/11/1996 08/07/1998 Aa2
08/07/1998 08/12/1998 Aa3
08/12/1998 27/08/1999 Aa2
27/08/1999 today Aa3
Any help with that? It is quite difficult for my and my database is quite large )more than 100,000 observations.
I hope someone could help
below is a sample from my data
issue_id rating_date rating
1 26/05/1993 Baa3
1 23/01/1997 Baa2
2 13/10/1993 Baa3
2 23/01/1997 Baa2
4 26/07/1994 Aa3
4 26/11/1996 Aa2
4 08/07/1998 Aa3
4 08/12/1998 Aa2
4 27/08/1999 Aa3
5 20/05/1993 Aa2
5 26/11/1996 Aa2
5 08/07/1998 Aa2
5 08/12/1998 Aa3
5 27/08/1999 Aa3
6 13/10/1993 Aa2
6 26/11/1996 Aa2
6 08/07/1998 Aa2
6 08/12/1998 Aa3
6 27/08/1999 Aa3
I have the following data. However, I need the rating to be in a time interval, i.e I want to add two columns FromDate and ToDate. Consequently , for issue_id 4 for example FromDate and Todate Should be the following:
FromDate ToDate Rating
26/07/1994 26/11/1996 Aa3
26/11/1996 08/07/1998 Aa2
08/07/1998 08/12/1998 Aa3
08/12/1998 27/08/1999 Aa2
27/08/1999 today Aa3
Any help with that? It is quite difficult for my and my database is quite large )more than 100,000 observations.
I hope someone could help