Open YIKAILucas opened 1 year 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
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