ml-finance-python

python scripts for finance machine learning

git clone https://9o.is/git/ml-finance-python.git

check_data.py

(423B)


      1 #!/usr/bin/env python
      2 # -*- coding: utf-8 -*-
      3 __author__ = 'Stefan Jansen'
      4 
      5 from pathlib import Path
      6 import numpy as np
      7 import pandas as pd
      8 
      9 pd.set_option('display.expand_frame_repr', False)
     10 np.random.seed(42)
     11 
     12 path = Path('transcripts', 'parsed')
     13 
     14 files = path.glob(('**/content.csv'))
     15 words = 0
     16 for file in files:
     17     words += pd.read_csv(file).content.str.split().str.len().sum()
     18 print(words)
     19 
     20 # print(len(list(files)))