Skip to content
Snippets Groups Projects
Unverified Commit f839313f authored by David Hoese's avatar David Hoese
Browse files

Fix 'sep' in CSV data api output

parent dd491cb7
No related branches found
No related tags found
No related merge requests found
...@@ -134,12 +134,12 @@ def handle_csv(frame, epoch, sep=',', ...@@ -134,12 +134,12 @@ def handle_csv(frame, epoch, sep=',',
# code: {code:d} # code: {code:d}
# message: {message} # message: {message}
# num_results: {num_results:d} # num_results: {num_results:d}
# fields: {epoch_str},{symbol_list} # fields: {epoch_str}{sep}{symbol_list}
{symbol_data} {symbol_data}
""" """
data_lines = [] data_lines = []
line_format = "{time},{symbols}" line_format = sep.join(["{time}", "{symbols}"])
for t, row in frame.iterrows(): for t, row in frame.iterrows():
line = line_format.format( line = line_format.format(
time=t, time=t,
...@@ -152,6 +152,7 @@ def handle_csv(frame, epoch, sep=',', ...@@ -152,6 +152,7 @@ def handle_csv(frame, epoch, sep=',',
epoch_str = data_responses.epoch_translation[epoch] + ' since epoch (1970-01-01 00:00:00)' epoch_str = data_responses.epoch_translation[epoch] + ' since epoch (1970-01-01 00:00:00)'
output = output.format( output = output.format(
sep=sep,
status=status, status=status,
code=code, code=code,
message=message, message=message,
......
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
<b>sep:</b> <b>sep:</b>
</td> </td>
<td style='padding: 6px;'> <td style='padding: 6px;'>
The separator to use between each data point. Works with csv and XML formats. By default, the separator is a ','. The separator to use between each data point. Works with CSV and XML formats. By default, the separator is a ','.
</td> </td>
</tr> </tr>
<tr> <tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment