인프런 커뮤니티 질문&답변

윤동영님의 프로필 이미지

작성한 질문수

공공데이터로 파이썬 데이터 분석 시작하기

[3/15] missingno 라이브러리로 결측치 시각화 하기

msno.matrix(df) 밸류에러

해결된 질문

24.02.26 23:17 작성

·

275

·

수정됨

0

 

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[46], line 2
      1 # heatmap 으로 표현합니다.
----> 2 msno.matrix(df)

File ~\anaconda3\Lib\site-packages\missingno\missingno.py:72, in matrix(df, filter, n, p, sort, figsize, width_ratios, color, fontsize, labels, sparkline, inline, freq, ax)
     70 # Remove extraneous default visual elements.
     71 ax0.set_aspect('auto')
---> 72 ax0.grid(b=False)
     73 ax0.xaxis.tick_top()
     74 ax0.xaxis.set_ticks_position('none')

File ~\anaconda3\Lib\site-packages\matplotlib\axes\_base.py:3194, in _AxesBase.grid(self, visible, which, axis, **kwargs)
   3192 _api.check_in_list(['x', 'y', 'both'], axis=axis)
   3193 if axis in ['x', 'both']:
-> 3194     self.xaxis.grid(visible, which=which, **kwargs)
   3195 if axis in ['y', 'both']:
   3196     self.yaxis.grid(visible, which=which, **kwargs)

File ~\anaconda3\Lib\site-packages\matplotlib\axis.py:1660, in Axis.grid(self, visible, which, **kwargs)
   1657 if which in ['major', 'both']:
   1658     gridkw['gridOn'] = (not self._major_tick_kw['gridOn']
   1659                         if visible is None else visible)
-> 1660     self.set_tick_params(which='major', **gridkw)
   1661 self.stale = True

File ~\anaconda3\Lib\site-packages\matplotlib\axis.py:932, in Axis.set_tick_params(self, which, reset, **kwargs)
    919 """
    920 Set appearance parameters for ticks, ticklabels, and gridlines.
    921 
   (...)
    929     gridlines.
    930 """
    931 _api.check_in_list(['major', 'minor', 'both'], which=which)
--> 932 kwtrans = self._translate_tick_params(kwargs)
    934 # the kwargs are stored in self._major/minor_tick_kw so that any
    935 # future new ticks will automatically get them
    936 if reset:

File ~\anaconda3\Lib\site-packages\matplotlib\axis.py:1076, in Axis._translate_tick_params(kw, reverse)
   1074 for key in kw_:
   1075     if key not in allowed_keys:
-> 1076         raise ValueError(
   1077             "keyword %s is not recognized; valid keywords are %s"
   1078             % (key, allowed_keys))
   1079 kwtrans.update(kw_)
   1080 return kwtrans

ValueError: keyword grid_b is not recognized; valid keywords are ['size', 'width', 'color', 'tickdir', 'pad', 'labelsize', 'labelcolor', 'zorder', 'gridOn', 'tick1On', 'tick2On', 'label1On', 'label2On', 'length', 'direction', 'left', 'bottom', 'right', 'top', 'labelleft', 'labelbottom', 'labelright', 'labeltop', 'labelrotation', 'grid_agg_filter', 'grid_alpha', 'grid_animated', 'grid_antialiased', 'grid_clip_box', 'grid_clip_on', 'grid_clip_path', 'grid_color', 'grid_dash_capstyle', 'grid_dash_joinstyle', 'grid_dashes', 'grid_data', 'grid_drawstyle', 'grid_figure', 'grid_fillstyle', 'grid_gapcolor', 'grid_gid', 'grid_in_layout', 'grid_label', 'grid_linestyle', 'grid_linewidth', 'grid_marker', 'grid_markeredgecolor', 'grid_markeredgewidth', 'grid_markerfacecolor', 'grid_markerfacecoloralt', 'grid_markersize', 'grid_markevery', 'grid_mouseover', 'grid_path_effects', 'grid_picker', 'grid_pickradius', 'grid_rasterized', 'grid_sketch_params', 'grid_snap', 'grid_solid_capstyle', 'grid_solid_joinstyle', 'grid_transform', 'grid_url', 'grid_visible', 'grid_xdata', 'grid_ydata', 'grid_zorder', 'grid_aa', 'grid_c', 'grid_ds', 'grid_ls', 'grid_lw', 'grid_mec', 'grid_mew', 'grid_mfc', 'grid_mfcalt', 'grid_ms']

df도 제대로 정의 했고

missingno도 잘 깔린 것 같은데 왜이러는건가요??

답변 2

0

박조은님의 프로필 이미지
박조은
지식공유자

2024. 02. 27. 10:36

해결되었다니 다행입니다!

즐거운 하루 되세요. 감사합니다 :)