
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
titanic = pd.read_table('train.csv',sep=',')
titanic.head()
print(titanic.isnull().sum())
titanic = titanic.dropna()
titanic.describe()
titanic['Age'].hist(bins=40,figsize=(18.8),grid=True)
실행하면
작성한 코드 및 에러 메세지
TypeError Traceback (most recent call last)
<ipython-input-12-1c1bc2e347ae> in <cell line: 10>()
8 titanic = titanic.dropna()
9 titanic.describe()
---> 10 titanic['Age'].hist(bins=40,figsize=(18.8),grid=True)
7 frames
/usr/local/lib/python3.10/dist-packages/matplotlib/figure.py in __init__(self, figsize, dpi, facecolor, edgecolor, linewidth, frameon, subplotpars, tight_layout, constrained_layout, layout, **kwargs)
2534 raise ValueError('figure size must be positive finite not '
2535 f'{figsize}')
-> 2536 self.bbox_inches = Bbox.from_bounds(0, 0, *figsize)
2537
2538 self.dpi_scale_trans = Affine2D().scale(dpi)
TypeError: Value after * must be an iterable, not float오류 발생 시, 작성한 코드 전체와 에러 메시지를 첨부해 주세요.
Tip 1) </> 아이콘을 눌러 코드박스를 만들어 보세요.
Tip 2) Ctrl+A(맥의 경우 Command+A) 단축키로 코드를 한 번에 선택할 수 있어요!
