inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

최상원님의 게시글

최상원 최상원

@cswhg18971

수강평 작성수
-
평균평점
-

게시글 7

질문&답변

파일 인식을 못한다고 합니다.

--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) in 5 get_ipython ( ) . run_line_magic ( 'matplotlib' , 'inline' ) 6 ----> 7 titanic_df = pd . read_csv ( './titanic_train.csv' ) 8 titanic_df . head ( 3 ) ~\anaconda3\lib\site-packages\pandas\io\parsers.py in read_csv (filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision) 684 ) 685 --> 686 return _read ( filepath_or_buffer , kwds ) 687 688 ~\anaconda3\lib\site-packages\pandas\io\parsers.py in _read (filepath_or_buffer, kwds) 450 451 # Create the parser. --> 452 parser = TextFileReader ( fp_or_buf , ** kwds ) 453 454 if chunksize or iterator : ~\anaconda3\lib\site-packages\pandas\io\parsers.py in __init__ (self, f, engine, **kwds) 944 self . options [ "has_index_names" ] = kwds [ "has_index_names" ] 945 --> 946 self . _make_engine ( self . engine ) 947 948 def close ( self ) : ~\anaconda3\lib\site-packages\pandas\io\parsers.py in _make_engine (self, engine) 1176 def _make_engine ( self , engine = "c" ) : 1177 if engine == "c" : -> 1178 self . _engine = CParserWrapper ( self . f , ** self . options ) 1179 else : 1180 if engine == "python" : ~\anaconda3\lib\site-packages\pandas\io\parsers.py in __init__ (self, src, **kwds) 2006 kwds [ "usecols" ] = self . usecols 2007 -> 2008 self . _reader = parsers . TextReader ( src , ** kwds ) 2009 self . unnamed_cols = self . _reader . unnamed_cols 2010 pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader.__cinit__ () pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source () FileNotFoundError : [Errno 2] No such file or directory: './titanic_train.csv' 에러코드는 이렇게 나옵니다.

좋아요수
0
댓글수
2
조회수
495

질문&답변

Unknown label type:'continuous-multioutput질문

import sklearn print(sklearn.__version__) from sklearn.datasets import load_iris from sklearn.tree import DecisionTreeClassifier from sklearn.model_selection import train_test_split import pandas as pd iris =load_iris() iris_data=iris.data iris_label=iris.data print('iris target 값:',iris_label) print('iris target명:', iris.target_names) iris_df=pd.DataFrame(data=iris_data, columns=iris.feature_names) iris_df['label']=iris.target iris_df.head(3) X_train, X_test, y_train, y_test=train_test_split(iris_data,iris_label, test_size=0.2,random_state=11) dt_clf=DecisionTreeClassifier(random_state=11) dt_clf.fit(X_train, y_train)

좋아요수
0
댓글수
8
조회수
7978

질문&답변

Unknown label type:'continuous-multioutput질문

ValueError Traceback (most recent call last) in 3 4 #학습 수행 ----> 5 dt_clf . fit ( X_train , y_train ) ~\anaconda3\lib\site-packages\sklearn\tree\_classes.py in fit (self, X, y, sample_weight, check_input, X_idx_sorted) 888 """ 889 --> 890 super().fit( 891 X , y , 892 sample_weight = sample_weight , ~\anaconda3\lib\site-packages\sklearn\tree\_classes.py in fit (self, X, y, sample_weight, check_input, X_idx_sorted) 179 180 if is_classification : --> 181 check_classification_targets ( y ) 182 y = np . copy ( y ) 183 ~\anaconda3\lib\site-packages\sklearn\utils\multiclass.py in check_classification_targets (y) 170 if y_type not in ['binary', 'multiclass', 'multiclass-multioutput', 171 'multilabel-indicator', 'multilabel-sequences']: --> 172 raise ValueError ( "Unknown label type: %r" % y_type ) 173 174 ValueError : Unknown label type: 'continuous-multioutput'

좋아요수
0
댓글수
8
조회수
7978

질문&답변

판다스읽기가 안됩니다.

잘 동작 됩니다 알려주셔서 감사합니다.

좋아요수
0
댓글수
2
조회수
797