Forum Discussion

iamriz's avatar
iamriz
Helper II
6 years ago
Solved

How can I print Japanese Characters via Python Visual?

My data table contains one column of Japanese words, when I print this to a chart as data label using Python Visual, 3 rectangular characters ( ▯▯▯) will be printed instead. Kindly help how to print ...
  • v-yuta-msft's avatar
    6 years ago

    iamriz ,

     

    This is not the issue in power bi, if you create a dataframe and run the code this issue also occurs. You may haven't configured the matplotlibrc, please download the .ttf font file and move the file to matplotlib/mpl-data/fonts/ttf then configure font.family, font.sans-serif and axes.unicode_minus like below:

    font.family : sans-serif        
    font.sans-serif : add the ttf file name here   
    axes.unicode_minus : False
    

    Finally run code below to reload the python environment:

    from matplotlib.font_manager import _rebuild
    
    _rebuild() #reload一下

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.