728x90
print(np.sort(sum_by_flag['Vis_flag']) #정렬
C:\Users\chpark\OneDrive\My_Code\_Scratch
[ 0. 0. 0. 0. 1. 3. 13. 14. 14. 19. 22. 25. 27. 28.
32. 32. 34. 46. 48. 61. 63. 65. 75. 79. 89. 102. 105. 111.
114. 124. 125. 156. 181. 181. 191. 198. 202. 208. 223. 272. 397. 643.
881.]
print(np.sort(sum_by_flag['Vis_flag'])[::-1])# 역정렬
C:\Users\chpark\OneDrive\My_Code\_Scratch
[881. 643. 397. 272. 223. 208. 202. 198. 191. 181. 181. 156. 125. 124.
114. 111. 105. 102. 89. 79. 75. 65. 63. 61. 48. 46. 34. 32.
32. 28. 27. 25. 22. 19. 14. 14. 13. 3. 1. 0. 0. 0.
0.]
아래는 사이트 별 빈도수 그림그리는 법
import matplotlib.pyplot as plt
%matplotlib inline
plt.figure(figsize=(28,12))
import plotnine as p9
p9.ggplot(data=df, mapping=p9.aes(x='Site_No', y='Vis_flag'))+ p9.geom_bar(stat='identity')
728x90