ydataai / ydata-profiling

1 Line of code data quality profiling & exploratory data analysis for Pandas and Spark DataFrames.
https://docs.profiling.ydata.ai
MIT License
12.49k stars 1.68k forks source link

multi language support #1466

Open YIKAILucas opened 1 year ago

YIKAILucas commented 1 year ago

Missing functionality

The whole web page is English, and cannot display other language natively.

Proposed feature

Could we have a multi-language support profiling? The community can support the ability to add more languages

Alternatives considered

No response

Additional context

No response

whxue0807 commented 11 months ago

You can try this, add a .ttf file to replace the default path in the file site-packages/ydata_profiling/visualisation/plot.py:
def _plot_word_cloud( series: Union[pd.Series, List[pd.Series]], figsize: tuple = (6, 4), ) -> plt.Figure: if not isinstance(series, list): series = [series] plot = plt.figure(figsize=figsize) for i, series_data in enumerate(series): word_dict = series_data.to_dict() wordcloud = WordCloud( background_color="white", random_state=123, width=300, height=200, scale=2 ,font_path='/home/STFangSong.ttf' ).generate_from_frequencies(word_dict)

    ax = plot.add_subplot(1, len(series), i + 1)
    ax.imshow(wordcloud)
    ax.axis("off")

return plot