Home>

### python - about kaggle's titanic: fare's histogram doesn't appear

I would like to ask you a question about the subject.

The details of the error are as follows.

``TypeError: hist () got multiple values ​​for argument'bins'``

The code content is as follows.

``````plt.hist (train.loc [train ['Survived'] == 0,'Fare']. dropna (),
range (0, 250), bins = 25, alpha = 0.5, label = '0')
plt.hist (train.loc [train ['Survived'] == 1,'Fare']. Dropna (),
range (0, 250), bins = 25, alpha = 0.5, label = '1')
plt.xlabel ('Fare')
plt.ylabel ('count')
plt.legend (title ='Survived')
plt.xlim (-5, 250)``````

In addition, since the following import is done in advance, it seems that it is not an error related to library recall.

``````import numpy as np
import pandas as pd
import pandas_profiling
import matplotlib.pyplot as plt
import seaborn as sns``````

I think it's just a typing mistake because I wrote it according to the code of the Kaggle introductory book that was published in the first place, and I think that it is just a typing mistake, but I am in trouble because I can not find the location of the typing mistake. We are here.

We apologize for the inconvenience, and thanks for your cooperation.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8468223,"math_prob":0.7417622,"size":3043,"snap":"2021-21-2021-25","text_gpt3_token_len":740,"char_repetition_ratio":0.12635736,"word_repetition_ratio":0.033834588,"special_character_ratio":0.25961223,"punctuation_ratio":0.09210526,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98012406,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-06-18T11:11:02Z\",\"WARC-Record-ID\":\"<urn:uuid:adca7abf-66cd-468e-a2bc-3d4c4bcb2b71>\",\"Content-Length\":\"14696\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e569c893-82de-4117-af18-d94d443339be>\",\"WARC-Concurrent-To\":\"<urn:uuid:5cfb38ca-8a36-406d-b465-954876b309fa>\",\"WARC-IP-Address\":\"104.21.91.148\",\"WARC-Target-URI\":\"https://www.tutorialfor.com/questions-323860.htm\",\"WARC-Payload-Digest\":\"sha1:5RZOUHTGEG6WJAL3BKJLS3ZQNYMATDTY\",\"WARC-Block-Digest\":\"sha1:M2OP4YLKRH4O7ICNTBJIQJ6MDP7U573Z\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-25/CC-MAIN-2021-25_segments_1623487636559.57_warc_CC-MAIN-20210618104405-20210618134405-00297.warc.gz\"}"}