# Path: dcs/analyze.py
# def textAnalysis(series):
# def numericalAnalysis(series):
# def dateAnalysis(series):
# def genericAnalysis(series):
# def analysisForColumn(df, column):


import numpy as np 
import pandas as pd 
import pytest
import datetime
from dcs import analyze
	test_analysis = analyze.numericalAnalysis(test_series)
	assert test_analysis["frequencies"] == [(3, 3), (2, 3), (4, 1), (1, 1)]

#test mode
def test_numeric_mode():
	test_series = df['col1']
	test_analysis = analyze.numericalAnalysis(test_series)
	assert test_analysis["mode"] == [3]

#test mode count
def test_numeric_mode_count():
	test_series = df['col1']
	test_analysis = analyze.numericalAnalysis(test_series)
	assert test_analysis["mode_frequency"] == 3


#------------------------(test analysis for date types)----------------------------

date_stngs = ('2008-12-20','2008-12-20','2000-12-22','2010-12-23')
date_series = pd.Series([pd.to_datetime(date) for date in date_stngs])

#test mode for date
def test_date_mode():
	test_series = date_series
	print test_series[0].isoformat()
	test_analysis = analyze.dateAnalysis(test_series)
	assert test_analysis["mode"] == ['2008-12-20T00:00:00Z']

#test mode count for date
def test_date_mode_count():

# Path: dcs/analyze.py
# def textAnalysis(series):
# def numericalAnalysis(series):
# def dateAnalysis(series):
# def genericAnalysis(series):
# def analysisForColumn(df, column):


# Path: dcs/testing/test_analyze_module.py
import numpy as np 
import pandas as pd 
import pytest
import datetime
from dcs import analyze

	test_analysis = analyze.numericalAnalysis(test_series)
	assert test_analysis["frequencies"] == [(3, 3), (2, 3), (4, 1), (1, 1)]

#test mode
def test_numeric_mode():
	test_series = df['col1']
	test_analysis = analyze.numericalAnalysis(test_series)
	assert test_analysis["mode"] == [3]

#test mode count
def test_numeric_mode_count():
	test_series = df['col1']
	test_analysis = analyze.numericalAnalysis(test_series)
	assert test_analysis["mode_frequency"] == 3


#------------------------(test analysis for date types)----------------------------

date_stngs = ('2008-12-20','2008-12-20','2000-12-22','2010-12-23')
date_series = pd.Series([pd.to_datetime(date) for date in date_stngs])

#test mode for date
def test_date_mode():
	test_series = date_series
	print test_series[0].isoformat()
	test_analysis = analyze.dateAnalysis(test_series)
	assert test_analysis["mode"] == ['2008-12-20T00:00:00Z']

#test mode count for date
def test_date_mode_count():

	test_series = date_series