shared/share_data_item_loader.py
def load_items_from_csv(self, share_ticker, count):
        '''
        Loads end-of-day data from the csv file to the database
        '''
        share_items = Share.objects.filter(ticker=share_ticker)
        if not share_items:
            print('Did not find related share for ticker', share_ticker)
            return
        csv_file = pd.read_csv(self.path, delimiter=',')
        csv_file['timestamp'] = pd.to_datetime(
            csv_file['timestamp'],
            errors='ignore'
        )
        csv_file.sort_values(by=['timestamp'], inplace=True, ascending=False)
        csv_file = csv_file.head(count)
        self.load_csv(share_items.first(), csv_file)

        Loads end-of-day data from the csv file to the database
        
Loads end-of-day data from the csv file to the database
Loads end - of - day data from the csv file to the database
def load_items_from_csv(self, share_ticker, count):
        share_items = Share.objects.filter(ticker=share_ticker)
        if not share_items:
            print('Did not find related share for ticker', share_ticker)
            return
        csv_file = pd.read_csv(self.path, delimiter=',')
        csv_file['timestamp'] = pd.to_datetime(
            csv_file['timestamp'],
            errors='ignore'
        )
        csv_file.sort_values(by=['timestamp'], inplace=True, ascending=False)
        csv_file = csv_file.head(count)
        self.load_csv(share_items.first(), csv_file)
def load_items_from_csv ( self , share_ticker , count ) : share_items = Share . objects . filter ( ticker = share_ticker ) if not share_items : print ( 'Did not find related share for ticker' , share_ticker ) return csv_file = pd . read_csv ( self . path , delimiter = ',' ) csv_file [ 'timestamp' ] = pd . to_datetime ( csv_file [ 'timestamp' ] , errors = 'ignore' ) csv_file . sort_values ( by = [ 'timestamp' ] , inplace = True , ascending = False ) csv_file = csv_file . head ( count ) self . load_csv ( share_items . first ( ) , csv_file )
Loads end-of-day data from the csv file to the database
Loads end - of - day data from the csv file to the database
'''
        Loads end-of-day data from the csv file to the database
        '''
self
share_ticker
count