Entering edit mode
17 months ago
sooni
▴
20
Hello. I have a question about 'gnomAD_DB' package of Python.
How to save query result as csv file?
This is my code.
test_df = db.get_info_from_df(dummy_var_df, "AF")
I want to make the result of 'test_df' into a csv file. What should I do?
test_df.to_csv('my_data.csv', index = False)
I tried running the code above, but it doesn't seem to save. I can't find the file.
Please help me.
The function
get_info_from_df
returns a Pandas Series, so your code is correct. Could you post the output ofdummy_var_df.shape
andlen(test_df)
?I use 'jupyter notebook'. I tried running both codes, but no information came up. What should I do in this case?
The image above is my jupyter notebook window.