initial-import: 2026-04-11 21:18:55
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
import base64
|
||||
import io
|
||||
import pandas as pd
|
||||
|
||||
df = pd.read_parquet('/Users/chufeng/nas/stock-data/sanguo_quant_live/zhaoyun-data/data/raw/daily/sh510300_daily.parquet')
|
||||
buffer = io.BytesIO()
|
||||
df.to_parquet(buffer, compression='snappy')
|
||||
buffer.seek(0)
|
||||
data = buffer.getvalue()
|
||||
b64 = base64.b64encode(data).decode('utf-8')
|
||||
|
||||
output_file = '/tmp/510300_daily.b64'
|
||||
with open(output_file, 'w') as f:
|
||||
f.write(b64)
|
||||
|
||||
print(f"Generated {output_file}")
|
||||
print(f"Size: {len(b64)} characters")
|
||||
Reference in New Issue
Block a user