Skip to content

Commit

Permalink
move get_random_row to new file
Browse files Browse the repository at this point in the history
  • Loading branch information
brownsugar-bobamilktea committed Jul 14, 2024
1 parent 7a0c883 commit b86027f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 1 addition & 4 deletions commands/taiwanese/read_embree_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,4 @@ def read_embree_csv_raw(
df = pd.read_csv(filepath, encoding='utf-8', index_col=index_col)
if cols_to_keep:
df = df[list(cols_to_keep)]
return df

def get_random_row(df: pd.DataFrame) -> pd.Series:
return df.sample().iloc[0]
return df
5 changes: 5 additions & 0 deletions commands/taiwanese/taiwanese_entry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import pandas as pd
from pathlib import Path

def get_random_row(df: pd.DataFrame) -> pd.Series:
return df.sample().iloc[0]

0 comments on commit b86027f

Please sign in to comment.