c75002546a88acc98141231171ef0ee157042bae,pandastable/plugins/remotedata.py,DataReaderPlugin,fetch,#DataReaderPlugin#,84

Before Change


        self.applyOptions()
        source = self.kwds["source"]
        start = datetime.datetime(2013, 1, 1)
        end = datetime.datetime(2016, 1, 27)
        if source == "Yahoo":
            df = web.DataReader("F", source, start, end)
        elif source == "FRED":
            df = web.DataReader("GDP", "fred", start, end)

After Change


        start = pd.to_datetime(st, format=dateformat, errors="ignore")
        end = pd.to_datetime(e, format=dateformat, errors="ignore")

        if source == "Yahoo Finance":
            df = web.DataReader("F", "yahoo", start, end)
        elif source == "Google Finance":
            df = web.DataReader("F", "google", start, end)
        elif source == "FRED":
            df = web.DataReader("GDP", "fred", start, end)
        elif source == "OECD":
            df = web.DataReader("UN_DEN", "oecd", end=end)
        elif source == "World Bank":
            df = wb.download(indicator="NY.GDP.PCAP.KD", country=["US", "CA", "MX"], start=2005, end=2008)
        elif source == "Eurostat":
            df = web.DataReader("tran_sf_railac", "eurostat")
        elif source == "TSP":
            import pandas_datareader.tsp as tsp
            tspreader = tsp.TSPReader(start="2015-10-1", end="2015-12-31")
            df = tspreader.read()
        elif source == "FAMA/French":
            ds = web.DataReader(dataset, "famafrench")
            df = ds[0]
        label = source+"_"+dataset
        self.parent.load_dataframe(df, label, True)
        return
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: dmnfarrell/pandastable
Commit Name: c75002546a88acc98141231171ef0ee157042bae
Time: 2017-11-12
Author: farrell.damien@gmail.com
File Name: pandastable/plugins/remotedata.py
Class Name: DataReaderPlugin
Method Name: fetch


Project Name: home-assistant/home-assistant
Commit Name: 35f0270688d2bd1e31e45ebbc1771f1ff940bff6
Time: 2015-07-16
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/sun.py
Class Name: Sun
Method Name: update_as_of


Project Name: home-assistant/home-assistant
Commit Name: 35f0270688d2bd1e31e45ebbc1771f1ff940bff6
Time: 2015-07-16
Author: paulus@paulusschoutsen.nl
File Name: tests/test_component_sun.py
Class Name: TestSun
Method Name: test_setting_rising