Skip to content

Commit 2b7a924

Browse files
committed
MOD: Rename chan_id to channel_id pt1
.
1 parent 21fbed8 commit 2b7a924

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

databento/common/bento.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def to_df(self, pretty_ts: bool = False, pretty_px: bool = False) -> pd.DataFram
447447

448448
# Cleanup dataframe
449449
if self.schema == Schema.MBO:
450-
df.drop("chan_id", axis=1, inplace=True)
450+
df.drop("channel_id", axis=1, inplace=True)
451451
df = df.reindex(columns=DBZ_COLUMNS[self.schema])
452452
df["flags"] = df["flags"] & 0xFF # Apply bitmask
453453
df["side"] = df["side"].str.decode("utf-8")

databento/common/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def get_deriv_ba_types(level: int) -> List[Tuple[str, Union[type, str]]]:
7474
("price", np.int64),
7575
("size", np.uint32),
7676
("flags", np.int8),
77-
("chan_id", np.uint8),
77+
("channel_id", np.uint8),
7878
("action", "S1"), # 1 byte chararray
7979
("side", "S1"), # 1 byte chararray
8080
("ts_recv", np.uint64),

tests/test_historical_bento.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def test_bento_given_initial_nbytes_returns_expected_metadata(self) -> None:
8989
("price", "<i8"),
9090
("size", "<u4"),
9191
("flags", "i1"),
92-
("chan_id", "u1"),
92+
("channel_id", "u1"),
9393
("action", "S1"),
9494
("side", "S1"),
9595
("ts_recv", "<u8"),

0 commit comments

Comments
 (0)