Skip to content

Tag: dataframe

Select some datetime from base

I have a 2 table in my base. The first table is reservation table. The start_ts and end_ts are time when start and end the reservation of desk (desk_id): [Reservation_table] The second is motion, which come from sensors motion. [Motion_table] This 2 tables are connecting that the sensors are start save to the base when someone come to desk (desk_id).

Processing mulitple similar rows in Pandas

I have a dataframe pulled from a relational database. A one-to-many join has resulted in many similar rows with one column different. I would like to combine the similar rows but have the differing column data contained within a list, for each unique row. I am also able to change the SQL but I think this may be easier to

How to merge rows in sql

I am trying to understand how to merge two rows (which are the same) into one. They both have data that needs to be in the same row but the raw data currently has split them into two rows. Essentially,…

Importing JSON data from SQL DB to an R dataframe

I would like to know whether there is a way of importing JSON data from a MySQL DB to an R dataframe. I have a table like this: I would like to get the columns ‘id’ and ‘json’. I am using RMySQL package for getting the data from the db to an R dataframe but this gives me only the