예제 #1
0
 def setUp(self):
     try:
         import pandas as pd
     except:
         raise SkipTest('Pandas not available')
     patch('pandas')
     self.df = pd.DataFrame([[1, 2], [3, 4], [5, 6]], columns=['x', 'y'])
예제 #2
0
 def setUp(self):
     super().setUp()
     try:
         import dask.dataframe as dd
     except:
         raise SkipTest('Dask not available')
     patch('dask')
     self.df = dd.from_pandas(self.df, npartitions=2)
     self.cat_df = dd.from_pandas(self.cat_df, npartitions=3)
예제 #3
0
 def setUp(self):
     try:
         import pandas as pd
     except:
         raise SkipTest('Pandas not available')
     self.backend = 'bokeh'
     hv.extension(self.backend)
     Store.current_backend = self.backend
     self.store_copy = OptionTree(sorted(Store.options().items()),
                                  groups=Options._option_groups)
     patch('pandas')
     self.df = pd.DataFrame([[1, 2, 'A', 0.1], [3, 4, 'B', 0.2], [5, 6, 'C', 0.3]],
                            columns=['x', 'y', 'category', 'number'])
예제 #4
0
 def setUp(self):
     try:
         import pandas as pd
     except:
         raise SkipTest('Pandas not available')
     patch('pandas')
     self.df = pd.DataFrame([[1, 2], [3, 4], [5, 6]], columns=['x', 'y'])
     self.cat_df = pd.DataFrame([[1, 2, 'A'], [3, 4, 'B'], [5, 6, 'C']],
                                columns=['x', 'y', 'category'])
     self.cat_only_df = pd.DataFrame([['A', 'a'], ['B', 'b'], ['C', 'c']],
                                     columns=['upper', 'lower'])
     self.time_df = pd.DataFrame({
         'time': pd.date_range('1/1/2000', periods=10, tz='UTC'),
         'A': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
         'B': 'abcdefghij'})
예제 #5
0
 def setUp(self):
     try:
         import numpy as np
         import pandas as pd
     except:
         raise SkipTest('Pandas not available')
     patch('pandas')
     self.df = pd.DataFrame([[1, 2], [3, 4], [5, 6]], columns=['x', 'y'])
     self.cat_df = pd.DataFrame([[1, 2, 'A'], [3, 4, 'B'], [5, 6, 'C']],
                                columns=['x', 'y', 'category'])
     self.time_df = pd.DataFrame({
         'time':
         pd.date_range('1/1/2000', periods=5 * 24, freq='1H', tz='UTC'),
         'temp':
         np.sin(np.linspace(0, 5 * 2 * np.pi, 5 * 24)).cumsum()
     })
예제 #6
0
 def setUp(self):
     patch('pandas')
     self.df = pd.DataFrame([[1, 2], [3, 4], [5, 6]], columns=['x', 'y'])