Hi, I am new to pandas and MongoDB. This is the problem I have:
I have some data stored in MongoDB. My database is simply called ‘mydata’. I have two files in the collection: file1 and file2.
So I my program only needs to connect to MongoDB and load file1 which is in bson format. I want to read file1 into a dataframe- df and carry out a certain operation which involves the removal of certain data from one of the columns. I have worked out how to do that. I now need to save the modified dataframe to mongoDB in such a way that it overwrites / replaces the original file1.
I can’t work out how to do this. Please can anyone help me? Thanks