Skip to content

Two bugs about data type#182

Open
cuiran wants to merge 1 commit intobulik:masterfrom
cuiran:make_annot_bugfix
Open

Two bugs about data type#182
cuiran wants to merge 1 commit intobulik:masterfrom
cuiran:make_annot_bugfix

Conversation

@cuiran
Copy link

@cuiran cuiran commented Nov 21, 2019

Specifying int type for x2 in iter_bim fixes error 'numpy.int64 object has no attribute isdigit'. Changed the file saving line to include the compression in the to_csv arguments. This avoids error about something needs to be bytes like and not string...

…t has no attribute isdigit'. Changed the file saving line to include the compression in the to_csv arguments. This avoids error about something needs to be bytes like and not string...
if args.annot_file.endswith('.gz'):
with gzip.open(args.annot_file, 'wb') as f:
df_annot.to_csv(f, sep = "\t", index = False)
df_annot.to_csv(args.annot_file, sep = "\t", index = False, compression='\gzip')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get rid of the backslash on \gzip?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, pandas 0.24 can infer compression based on extension, but not in 0.20 which we're pinned to (bummer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants