Skip to content

Commit

Permalink
Merge pull request #1 from Shimingyi/master
Browse files Browse the repository at this point in the history
Fixed the re-sort error in join_csv function
  • Loading branch information
Dene33 authored Jun 30, 2019
2 parents 3ef1228 + c3fa6bf commit 83b2c33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ def main(img_path, json_path=None):

def join_csv():
path = 'hmr/output/csv/'
all_files = glob.glob(os.path.join(path, "*.csv") )

df_from_each_file = (pd.read_csv(f) for f in sorted(all_files))
all_files = glob.glob(os.path.join(path, "*.csv"))
all_files.sort(key=lambda x: int(x.split('/')[-1].split('.')[0]))
df_from_each_file = (pd.read_csv(f) for f in all_files)
concatenated_df = pd.concat(df_from_each_file, ignore_index=True)

concatenated_df['frame'] = concatenated_df.index+1
Expand Down

0 comments on commit 83b2c33

Please sign in to comment.