Skip to content

Tag: dataframe

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

Pandas dataframe combine unique row values

I have a dataframe like the following with over 90000 rows. As you can see, some origin and destination values repeat for example there are multiple rows where origin=101011001, destination=101011002. My goal is to group the repeating origin and destination values and sum the the people column, so the datafra…

SQL & Pandas Efficiency [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago. Improve this question Quick question. What is the rule of thumb when deciding where to begi…