Ulnar nerve inflammation/injuries are pretty common among pianists - it's due to mis-use when you're working at the piano. Hammering away, pressing too hard, striking keys with force, endless repetition, playing pieces too difficult too soon etc are some of the main causes.
I'm not suggesting that you do any of the above, although I suspect that you probably do - and that is due to inexperience, alas.
You say you've only been playing for 10 months, yet you play for hours each day. With respect, that is way too long a time to be playing for. Think of stamina - it takes months/years to build up good cardio stamina - running a marathon too soon would cause injury. If I played tennis for hours every day, yet I had only been learning for 10 months, I'd probably be in hospital with tennis elbow and heaven knows what else. Piano is no different - it is physical - you have to learn how best to utilise your body - arms, hands, back - all of it. Posture, balance, tension, relaxation etc.
There are some great exercises for ulnar nerve issues - you could try some - or, indeed, work with a physical therapist for a while.
Loving playing the piano is great - but perhaps explore working with a teacher who can enable you to use your whole body correctly when playing - and that will build up stamina and prevent future injury. DO NOT work through pain!