Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hpgres.csv file was split in the middle of a line #10

Open
biophyser opened this issue Sep 17, 2018 · 0 comments
Open

hpgres.csv file was split in the middle of a line #10

biophyser opened this issue Sep 17, 2018 · 0 comments

Comments

@biophyser
Copy link
Contributor

I just wanted to make sure that you all were aware of this when you recombine the files once they're loaded into data frames. This is the code I used to fix that when I loaded the data in:

hpgres1 = pd.read_csv('hpg_reserve_1.csv')
hpgres2 = pd.read_csv('hpg_reserve_2.csv')
# The hpg_reserve.csv file got split mid-line, this fixes that line
hpgres1.iloc[-1,0] += hpgres2.iloc[0,0]
hpgres1.iloc[-1,1:] = hpgres2.iloc[0,1:]
# Throwing all the hpg_reserve data into a single dataframe
hpgres = pd.concat([hpgres1, hpgres2.iloc[1:,:]], ignore_index=True)
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

No branches or pull requests

1 participant