This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pipe_log(data, logger, message=None, level='DEBUG'): | |
''' | |
Logging function to be used in pd.DataFrame.pipe(). Insert anywhere | |
in a method chain to log head and shape of dataframe/series along | |
with a custom message with the set logging level, then returns the | |
dataframe unchanged. | |
Params: | |
- data: pandas.DataFrame or pandas.Series |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function extractData(messages) { | |
let data = {}; | |
messages.forEach(message => { | |
if (message.symbols) { | |
let symbols = message.symbols; | |
symbols.forEach(symbol => { | |
if (data[symbol.symbol]) { | |
data[symbol.symbol].count += 1; | |
} else { | |
data[symbol.symbol] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>D3 test</title> | |
<style> | |
body { | |
font-family: Arial; | |
color: #888888; | |
} |