jzmejia / datatools Goto Github PK
View Code? Open in Web Editor NEWA collection of data analysis tools for post-processing raw data and getting it into workable formats in python for further analysis
A collection of data analysis tools for post-processing raw data and getting it into workable formats in python for further analysis
Passing a series (empty) to is same. Need work around
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-39-6176c7133a7e> in <module>
1 eorm_vel = c_rolling(c_rolling(eorm17.vel,'6H',min_periods=100)['2017-8-5':'2017-8-20'],'6H').dropna()
2
----> 3 eorm17_diurnal = DiurnalExtrema(eorm_vel,generate_figure=True)
~/WorkingDir/GrIS/X_PYTHON-CODES/datatools/diurnal.py in __init__(self, timeseries, minfirst, maxnextday, predictTiming, window, threshold, generate_figure, stn, **kwargs)
161 self.diurnal_vals = []
162
--> 163 self.df = self.find_diurnal_extrema()
164 if self.generate_figure:
165 self.plot()
~/WorkingDir/GrIS/X_PYTHON-CODES/datatools/diurnal.py in find_diurnal_extrema(self)
227 else:
228 # find diurnal minimum
--> 229 minVal, minTime = self.get_real_extrema(
230 self.timeseries, day, 'min')
231 if self.minfirst and self.maxnextday:
~/WorkingDir/GrIS/X_PYTHON-CODES/datatools/diurnal.py in get_real_extrema(self, ts, window, min_or_max)
374 extremaTuple = self.get_extrema(
375 ts[window[0]:window[1]], min_or_max)
--> 376 if not on_boundary(ts, window, extremaTuple, min_or_max):
377 extremaTuple = (None, None)
378 return extremaTuple
~/WorkingDir/GrIS/X_PYTHON-CODES/datatools/diurnal.py in on_boundary(timeseries, window, extrema_tuple, val_type)
525 bound = get_index_of_bound(
526 timeseries, window, start_or_end[idx])
--> 527 if _bool_is_same(bound, extrema_time):
528 boundary_ok = bool_check_around_bound(timeseries, bound,
529 extrema_tuple, val_type)
~/WorkingDir/GrIS/X_PYTHON-CODES/datatools/diurnal.py in _bool_is_same(val1, val2)
417
418 def _bool_is_same(val1, val2):
--> 419 return True if val1 == val2 else False
420
421
~/WorkingDir/GrIS/X_PYTHON-CODES/move/lib/python3.8/site-packages/pandas/core/generic.py in __nonzero__(self)
1327
1328 def __nonzero__(self):
-> 1329 raise ValueError(
1330 f"The truth value of a {type(self).__name__} is ambiguous. "
1331 "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
Newer pandas updates have changed syntax for dataframe multiindex, slicing, etc. Warnings and errors retured when viewing output df's. Fix syntax or require and specify older pandas version.
Hi Jess! when I import gpstools i get the error message that datatools.constants is missing on line 24. Its to import seconds_per_day,
I fixed this issue by commenting the line 24 in gpstools, but I don't know if this is going to affect other functions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.