I think that the following simple logic should be applied. If a question is in its essence more about data science (models, approaches, methods, tools, etc.), where a programming language represents just a context, then such question fits Data Science SE site better. If, alternatively, the situation is reversed, where programming (coding) aspects are the core of the question, while data science represents context, such question should be asked on (or migrated to) StackOverflow (with a corresponding tag, i.e.
python). I think that purely a fact of using a language, popular in data science community, as a context, does not justify a question to be considered on-topic on Data Science SE site. We can find an example of such situation in this purely R programming question.
It is important to ask questions on the most appropriate site, as, per SE rules, if a question is answered, it cannot be migrated to the other site, even, if that site is the most appropriate (other rules also apply in this case). There are other negative potential side effects of migration as well.