I'm having trouble understanding the grammar of this sentence:
I understand it means, "Its fun to dance," but I'm struggling to understand why の is placed here: おどるのはたのしいのです。
Japanese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Japanese language. It only takes a minute to sign up.Sign up to join this community
It's something called an explanatory-の.
So the last の turns "It's fun to dance" into "It's that it's fun to dance". This の is a kind of a nominalizer that wraps everything before it and forms a noun clause.
Note that you need some context for this sentence to make sense. For example, when the listener is wondering why you're dancing, you can say this to explain the reason.