Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Faker Python generating chinese/pinyin names

I am trying to generate random chinese names using Faker (Python), but it generates the names in chinese characters instead of pinyin.

I found this :
enter image description here

and it show that it generates them in pinyin, while when I try the same code, it gives me only chinese characters.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

how to get the pinyin ??

>Solution :

fake.romanized_name() worked for me.

I got lucky by looking through dir(fake). Doesn’t seem to have a method for pinyin address that I can see…

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading