如果我的hotel_type
中有变量DataFrame
,我会计算每个hotel_type
的数量
以下命令:
`df.hotel_type.value_counts()`
给出了结果:
Apartment 3157
Hotel 115
Villa 54
Bed and Breakfast 48
Holiday home 21
问题:如何使用x轴绘制条形图和直方图:酒店类型和y轴:使用matplotlib
每种酒店类型的数量?
答案 0 :(得分:2)
static Book searchTitle(){
Scanner input = new Scanner(System.in))
String booktitle;
System.out.println("Please enter title:");
booktitle = input.nextLine();
for(Book b : BookList){
if(b.getTitle() != null && b.getTitle().equals(booktitle)){
System.out.println(b.toString());
return (Book) b;
}
System.out.println("not found");
return null;
}
更新
ffmpeg -i input -filter_complex \
"[0:v]crop=iw/2:ih/2:0:0[lt]; \
[0:v]crop=iw/2:ih/2:ow:0[rt]; \
[0:v]crop=iw/2:ih/2:0:oh[lb]; \
[0:v]crop=iw/2:ih/2:ow:oh[rb]; \
[lb][lt]hstack[top]; \
[rt][rb]hstack[bottom]; \
[top][bottom]vstack" \
-c:a copy output