Skip to content

Commit

Permalink
change to Filesystem 1K-blocks Used Available Use% Mounted on
Browse files Browse the repository at this point in the history
tmpfs            3257224      3044   3254180   1% /run
/dev/nvme0n1p5 491732848 290872352 175808336  63% /
tmpfs           16286112     81500  16204612   1% /dev/shm
tmpfs               5120         8      5112   1% /run/lock
efivarfs             246        66       176  28% /sys/firmware/efi/efivars
tmpfs           16286112         0  16286112   0% /run/qemu
/dev/nvme0n1p1    262144     60008    202136  23% /boot/efi
tmpfs            3257220     15056   3242164   1% /run/user/1000 to avoid misleading linting attr errors
  • Loading branch information
hjoaquim committed May 7, 2024
1 parent 4e6b57e commit 282bc94
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@ def transform_data(
"""Transform the data to the standard format"""
if not data:
raise EmptyDataError()
data = DataFrame(data)
df = DataFrame(data)
percent_cols = [
"price_change_percent",
"iv30",
"iv30_change",
"iv30_change_percent",
]
for col in percent_cols:
if col in data.columns:
data[col] = round(data[col] / 100, 6)
data = (
data.replace(0, None)
if col in df.columns:
df[col] = round(df[col] / 100, 6)
df = (
df.replace(0, None)
.replace("", None)
.dropna(how="all", axis=1)
.fillna("N/A")
Expand All @@ -137,9 +137,9 @@ def transform_data(
"bid_size",
]
for col in drop_cols:
if col in data.columns:
data = data.drop(columns=col)
if col in df.columns:
df = df.drop(columns=col)
return [
CboeIndexSnapshotsData.model_validate(d)
for d in data.to_dict(orient="records")
for d in df.to_dict(orient="records")
]

0 comments on commit 282bc94

Please sign in to comment.