I will echo what sandworm says here. I went from a philosophy undergrad to law school to a law career to a coding bootcamp to a programming career.
The job is certainly demanding and detail oriented. Analytical, I guess it depends on what you mean by analytical. What I became disillusioned with was how brutally incoherent legal arguments can be. And to be honest, the Python code I encounter is often in better English than the legal code that I encountered. You can try reading the Illinois Compiled Statutes if you would like a taste.