aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/experiments/test_dask.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/experiments/test_dask.py b/python/experiments/test_dask.py
new file mode 100644
index 00000000..b790f9b4
--- /dev/null
+++ b/python/experiments/test_dask.py
@@ -0,0 +1,8 @@
+import dask.dataframe as dd
+converters = {f'Spread{t}': lambda s: float(s.rstrip('%'))/100 if s else np.nan \
+ for t in ['6m'] + [f'{y}y' for y in [1, 2, 3, 4, 5, 7, 10, 15, 20, 30]]}
+df = dd.read_csv("*.csv", skiprows=2, converters=converters,
+ dtype={'CompositeLevel4y': 'object', 'Rating4y': 'object',
+ 'CompositeDepth5y': 'object', 'AvRating': 'object',
+ 'ImpliedRating':'object'},
+ parse_dates=['Date'])