pecos.utils module¶
The utils module contains helper functions.
-
pecos.utils.
round_index
(dt, frequency, how='nearest')[source]¶ Round datetime index.
Parameters: dt : DatetimeIndex
Time series index
frequency : int
Expected time series frequency, in seconds
how : string (optional)
Method for rounding, default = ‘nearest’. Options include:
- nearest = round the index to the nearest expected integer
- floor= round the index to the largest expected integer such that the integer <= index
- ceiling = round the index to the smallest expected integer such that the integer >= index
Returns: rounded _dt : DatetimeIndex
Rounded time series index
-
pecos.utils.
convert_html_to_image
(html_filename, image_filename, image_format='png', quality=100, zoom=1)[source]¶ Convert html file to image file using wkhtmltoimage. See http://wkhtmltopdf.org/ for more information.
Parameters: html_filename : string
HTML file name, with full path
image_filename : string
Image file name, with full path
image_format : string (optional)
Image format, default = ‘png’
quality : int (optional)
Image quality, default = 100
zoom : int (optional)
Zoom factor, default = 1