| Conditions | 2 |
| Total Lines | 9 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from typing import Sequence |
||
| 10 | @classmethod |
||
| 11 | def hits_to_df(cls, hits: Sequence[AbstractHit]) -> HitFrame: |
||
| 12 | data = [] |
||
| 13 | for hit in hits: |
||
| 14 | x = {f: getattr(hit, f) for f in hit.__class__.fields()} |
||
| 15 | x["universal_id"] = hit.universal_id |
||
| 16 | x["hit_class"] = hit.hit_class |
||
| 17 | data.append(x) |
||
| 18 | return HitFrame([pd.Series(x) for x in data]) |
||
| 19 | |||
| 35 |