# Path: twip/constant.py
# DATA_PATH = os.path.abspath(os.path.join(BASE_PATH, '..', 'data'))


from past.builtins import basestring
from matplotlib import pyplot as plt
from twip.constant import DATA_PATH
from IPython.display import display, HTML 
import os
import pandas as pd
import matplotlib
import gzip

mask = [col for col in df.columns if df[col].dtype in (bool, float, np.dtype('int64'))]  # don't forget bool and int64 (not int)!
mask
numbers = df[mask]
numbers


# In[8]:

with gzip.open(os.path.join(DATA_PATH, 'numbers.csv.gz'), 'wb') as f:
    numbers.to_csv(os.path.join(DATA_PATH, 'numbers.csv.gz'), encoding='utf-8')


# In[6]:

numbers = pd.read_csv(os.path.join(DATA_PATH, 'numbers.csv.gz'), compression='gzip', engine='python')


# In[7]:

[col for col in numbers.columns if 'follow' in col]


# In[11]:

numbers.columns = [col.replace(' ', '_') for col in numbers.columns]


# In[12]:


# Path: twip/constant.py
# DATA_PATH = os.path.abspath(os.path.join(BASE_PATH, '..', 'data'))


# Path: docs/notebooks/06 Features -- Numeric.py
from past.builtins import basestring
from matplotlib import pyplot as plt
from twip.constant import DATA_PATH
from IPython.display import display, HTML 
import os
import pandas as pd
import matplotlib
import gzip


mask = [col for col in df.columns if df[col].dtype in (bool, float, np.dtype('int64'))]  # don't forget bool and int64 (not int)!
mask
numbers = df[mask]
numbers


# In[8]:

with gzip.open(os.path.join(DATA_PATH, 'numbers.csv.gz'), 'wb') as f:
    numbers.to_csv(os.path.join(DATA_PATH, 'numbers.csv.gz'), encoding='utf-8')


# In[6]:

numbers = pd.read_csv(os.path.join(DATA_PATH, 'numbers.csv.gz'), compression='gzip', engine='python')


# In[7]:

[col for col in numbers.columns if 'follow' in col]


# In[11]:

numbers.columns = [col.replace(' ', '_') for col in numbers.columns]


# In[12]:


cols = [col for col in numbers.columns if 'follow' in col]