Faker Python generating chinese/pinyin names

Question:

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.

how to get the pinyin ??

Asked By: Armonia

||

Answers:

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…

Answered By: 11574713
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.