File size: 1,491 Bytes
8719013
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 24 16:32:31 2021

@author: benjaminull
"""

from modules.mongo.mongo_api.mongo_api import _MongoSeries, _MongoDoc, _MongoTable


class EquityMaster(_MongoSeries):
    _name = 'equity_master'
    _key_ls = ['country', 'currency', 'asset', 'investable',
               'ind_sector', 'ind_group', 'ind_industry',
               'lv1', 'lv2', 'ind_esg', 'driver', 'field']
    _drop_weekends = True
    _override_boolean_key = ['investable']

class MacroMaster(_MongoSeries):
    _name = 'macro_master'
    _key_ls = ['country', 'currency', 'instrument', 'source', 'field']
    _drop_weekends = True

class WebInfoMaster(_MongoSeries):
    _name = 'web_info_master'
    _key_ls = ['country', 'asset', 'investable',
               'ind_sector', 'ind_group', 'ind_industry',
               'ind_internal', 'ind_esg', 'source', 'field']
    _drop_weekends = True

    
class RealEstateMaster(_MongoTable, ):
    _name = 'real_estate_master'
    _key_ls = ['id_pub', 'market', 'prop_type', 'bath', 'bed']
    
    
class ScoringMaster(_MongoSeries):
    _name = 'scoring_master'
    _key_ls = ['country', 'lv1','lv2', 'asset', 'metric']

#RealEstateMaster(id_pub=2, market=3, prop_type='depto').insert(prueba)   

 
#RealEstateMaster().get_keys()
#RealEstateMaster().insert(dataframe, keys)
#RealEstateMaster().update_values(dataframe, keys)
# data frame nombre df.name=id_pub, mercado, tipo propiedad concatenados con un punto