Data Analysis with Python and Pandas Tutorial Introduction




Pandas is a Python module, and Python is the programming language that we’re going to use. The Pandas module is a high performance, highly efficient, and …

Original source


45 responses to “Data Analysis with Python and Pandas Tutorial Introduction”

  1. If you have an error after changing "import pandas.io.data as web" TO "import pandas_datareader.data as web"
    You may need to manually pip install pandas_datareader (make sure you install it to the correct environment or virtualenv )

    If you STILL have errors, you may need to change a line in the "fred.py" file INSIDE the pandas_datareader package:
    WHY? Because "pandas.core.common import is_list_like" was changed.
    FIX:
    STEP 1: DELETE or COMMENT OUT this line:
    from pandas.core.common import is_list_like
    STEP 2: Add this line:
    from pandas.api.types import is_list_like

    This got it to work for me.
    More info:
    https://stackoverflow.com/questions/43326284/trying-to-use-pandas-to-load-stock-data-but-not-working/43327571#43327571

    Also, updated tutorial (not updated video, just the text instructions)
    https://pythonprogramming.net/data-analysis-python-pandas-tutorial-introduction/

  2. can you suggest me which course is better,,,,because im totally confused,,,some peoples say that orcale(sql and pl slq) are best,,then other group says python(django) are best,,,can you help me????????

  3. I ALWAYS GET STUCK ON ALL YOUR Tutorials…. its soo frustraing …. i run the full code on this video and i keep getting errors…

    Traceback (most recent call last):
    File "C:/Users/Dready/AppData/Local/Programs/Python/Python36-32/testst.py", line 2, in <module>
    import pandas_datareader.data as web
    File "C:UsersDreadyAppDataLocalProgramsPythonPython36-32libsite-packagespandas_datareader__init__.py", line 2, in <module>
    from .data import (DataReader, Options, get_components_yahoo,
    File "C:UsersDreadyAppDataLocalProgramsPythonPython36-32libsite-packagespandas_datareaderdata.py", line 14, in <module>
    from pandas_datareader.fred import FredReader
    File "C:UsersDreadyAppDataLocalProgramsPythonPython36-32libsite-packagespandas_datareaderfred.py", line 1, in <module>
    from pandas.core.common import is_list_like
    ImportError: cannot import name 'is_list_like'
    >>>

  4. Hi all,

    Please advise for these errors.

    Thanks.

    ImportError Traceback (most recent call last)

    <ipython-input-3-2eb94d24b6ed> in <module>()

    1 import datetime

    —-> 2 import pandas_datareader.data as web

    3 import matplotlib.pyplot as plt

    4 from matplotlib import style

    5

    C:ProgramDataAnaconda3libsite-packagespandas_datareader__init__.py in <module>()

    1 from ._version import get_versions

    —-> 2 from .data import (DataReader, Options, get_components_yahoo,

    3 get_dailysummary_iex, get_data_enigma, get_data_famafrench,

    4 get_data_fred, get_data_google, get_data_moex,

    5 get_data_morningstar, get_data_quandl, get_data_stooq,

    C:ProgramDataAnaconda3libsite-packagespandas_datareaderdata.py in <module>()

    12 ImmediateDeprecationError

    13 from pandas_datareader.famafrench import FamaFrenchReader

    —> 14 from pandas_datareader.fred import FredReader

    15 from pandas_datareader.google.daily import GoogleDailyReader

    16 from pandas_datareader.google.options import Options as GoogleOptions

    C:ProgramDataAnaconda3libsite-packagespandas_datareaderfred.py in <module>()

    —-> 1 from pandas.core.common import is_list_like

    2 from pandas import concat, read_csv

    3

    4 from pandas_datareader.base import _BaseReader

    5

    ImportError: cannot import name 'is_list_like'

  5. Can you help me:
    so basically I did a crowdsourcing project. people tested the website and gave feedback regarding errors. they rated the error on a scale 1-5 and wrote what is the error (in German). I need now to clean the database with text mining and write with machine learning an algorithm who finds and erases duplicates. It should be based on pandas phyton.

    It should be done through Skype because I cannot give u the dataset. additionally, I need a very clear manual because I need to do it in the future. so understanding is very important.

    Attached is sample data. The data is in an excel field with several columns important is for me the text field

    for example 

    A wrote> facebook button in corner not working
    b wrote> function of Facebook button in right corner disabled

    I think first step is to convert German to English because the database is mixed. second step is text mining to clean the database then find similarity between sentences with machine learning

    everything based on python (best would be Pandas and sklearn)

  6. The yahoo API is no longer available. You could, otherwise, get similar charts by switching the key 'yahoo' for 'google' (which is not stable, according to my code's output, but it will generate a chart anyway).

  7. Hi, I'm working on a scenario where customer related data has to be imputed. I used this code as given below:
    df1.update(df1.replace('', np.nan).set_index('Name', append=True)
    .groupby(level='Name')['Cust ID']
    .apply(lambda x: x.fillna(x.value_counts().idxmax() if x.value_counts().max() >=1 else '' , inplace = False))
    .reset_index('Name', drop=True))
    df1.update(df1.replace('', np.nan).set_index('Books Purchased', append=True)
    .groupby(level='Books Purchased')['Cust ID']
    .apply(lambda x: x.fillna(x.value_counts().idxmax() if x.value_counts().max() >=1 else '' , inplace = False))
    .reset_index('Books Purchased', drop=True))
    df1.update(df1.replace('', np.nan).set_index('Feedback', append=True)
    .groupby(level='Feedback')['Cust ID']
    .apply(lambda x: x.fillna(x.value_counts().idxmax() if x.value_counts().max() >=1 else '' , inplace = False))
    .reset_index('Feedback', drop=True))

    Please suggest me the fastest and optimized solution for this problem.

Leave a Reply