For the last 6 months I have applied to jobs, gotten lots of interviews for data science positions.
I got to the last stage a couple of times, so I know its not the technical skills I am lacking. So I don't know what it is. How would I figure out where I have a problem?
Your resume is working great and doing its job of getting you the interviews. So no problem there.
The issue is closing the deals and receiving the offers. That rests on your interview skills and convincing the interviewer(s) of your experience, expertise, and fit.
Don't be discouraged. I have been in that position many times. The best way to figure it out is to reach out to some of the most recent interviewers and ask. Thank them for their time and request some feedback on your interview with them. They may or may not be willing to help, but you will never know if you don't ask. You can also setup a practice interview with someone you know and trust, who will give you honest feedback. The practice can only help. The final suggestion is to check your references. This one is thought about very little by most people. It is true that quite often employers may not actually check, but in case they do find out what is being said about you. I know of a couple of people who found out their references were not what they thought. They each were fortunate enough to have a potential employer tip them off to check. Have someone pose as a potential employer checking a reference. You may be surprised at what you find out. Don't forget to objectively look at what your social media says about you. Employers are using this tool more and more to see who the people they are considering hiring are. Good Luck.