polm / cutlet

Japanese to romaji converter in Python
https://polm.github.io/cutlet/
MIT License
299 stars 21 forks source link

convert to romaji to values in pandas column #22

Closed MorganeBT closed 3 years ago

MorganeBT commented 3 years ago

Dear Polm, Thanks for sharing this cutlet code 👍 I would like to try it on a dataframe for some column values in Japanese. How do you insert pandas column values instead of only a text ? Many thanks in advance !

`katsu.romaji('df['Column']`)
=> ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Pythonely,

Morgane

polm commented 3 years ago

Sorry but I'm going to close this. Your question has nothing to do with cutlet, it's a question about how to use pandas. I suggest you ask on Stack Overflow, though it looks like you can do something like this:

roma = [katsu.romaji(xx) for xx in df['something']]

Good luck with it.