4ba63dbf0e5142603267d2e13ab0fb9762bd7151,QUANTAXIS/QAData/base_datastruct.py,_quotation_base,select_time,#_quotation_base#Any#Any#,733

Before Change


                return self.data.loc[(slice(pd.Timestamp(start), pd.Timestamp(end)), slice(None)), :]
            else:
                return self.data.loc[(slice(pd.Timestamp(start), None), slice(None)), :]
        if self.type[-3:] in ["day"]:
            return self.new(_select_time(start, end).set_index(["date", "code"], drop=False), self.type, self.if_fq)
        elif self.type[-3:] in ["min"]:
            return self.new(_select_time(start, end).set_index(["datetime", "code"], drop=False), self.type, self.if_fq)

        // if self.type[-3:] in ["day"]:
        //     if end is not None:

        //         return self.new(self.query("date>="{}" and date<="{}"".format(start, end)).set_index(["date", "code"], drop=False), self.type, self.if_fq)
        //     else:
        //         return self.new(self.query("date>="{}"".format(start)).set_index(["date", "code"], drop=False), self.type, self.if_fq)
        // elif self.type[-3:] in ["min"]:
        //     if end is not None:
        //         return self.new(self.data[self.data["datetime"] >= start][self.data["datetime"] <= end].set_index(["datetime", "code"], drop=False), self.type, self.if_fq)
        //     else:
        //         return self.new(self.data[self.data["datetime"] >= start].set_index(["datetime", "code"], drop=False), self.type, self.if_fq)

    def select_month(self, month):
        def _select_month(month):
            return self.data.loc[month, slice(None)]
        if self.type[-3:] in ["day"]:

After Change


                return self.data.loc[(slice(pd.Timestamp(start), pd.Timestamp(end)), slice(None)), :]
            else:
                return self.data.loc[(slice(pd.Timestamp(start), None), slice(None)), :]
        try:
            return self.new(_select_time(start, end), self.type, self.if_fq)
        except:
            raise ValueError(
                "QA CANNOT GET THIS START {}/END{} ".format(start, end))

    def select_month(self, month):
        
        选择月份
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 23

Instances


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 4ba63dbf0e5142603267d2e13ab0fb9762bd7151
Time: 2018-06-04
Author: 604829050@qq.com
File Name: QUANTAXIS/QAData/base_datastruct.py
Class Name: _quotation_base
Method Name: select_time


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 4ba63dbf0e5142603267d2e13ab0fb9762bd7151
Time: 2018-06-04
Author: 604829050@qq.com
File Name: QUANTAXIS/QAData/base_datastruct.py
Class Name: _quotation_base
Method Name: select_time


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 4ba63dbf0e5142603267d2e13ab0fb9762bd7151
Time: 2018-06-04
Author: 604829050@qq.com
File Name: QUANTAXIS/QAData/base_datastruct.py
Class Name: _quotation_base
Method Name: select_code


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 4ba63dbf0e5142603267d2e13ab0fb9762bd7151
Time: 2018-06-04
Author: 604829050@qq.com
File Name: QUANTAXIS/QAData/base_datastruct.py
Class Name: _quotation_base
Method Name: select_month


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 4ba63dbf0e5142603267d2e13ab0fb9762bd7151
Time: 2018-06-04
Author: 604829050@qq.com
File Name: QUANTAXIS/QAData/base_datastruct.py
Class Name: _quotation_base
Method Name: selects