您如何将星级评定为可视化

use*_*857 1 python visualization r

我有一个简单的数据帧.

name    Rating
George     2
Henry      4
Run Code Online (Sandbox Code Playgroud)

在python或R中,我想像亚马逊一样制作星级评级可视化.

name     Rating
George     **
Henry      ****
Run Code Online (Sandbox Code Playgroud)

Hon*_*Ooi 5

在R:

df$Rating <- strrep("*", df$Rating)
Run Code Online (Sandbox Code Playgroud)