0
$\begingroup$

I have two csv files,and if I do:

df_compiler = pd.read_csv('sub_compiler.csv')

I obtain:

enter image description here

and for the other csv file I do:

df_opt = pd.read_csv('sub_opt.csv')

I obtain:

enter image description here

now what I would like to do is merge these two csv files and obtain something like:

enter image description here

can somebody please help me doing this? Thank's in advance.

$\endgroup$
0
$\begingroup$

I would normally suggest something like

merged_df = pd.merge(df_compiler, df_opt, on="instructions")

But the third image you posted does not really look like the inner merge of the other two. Can you describe what exactly you are trying to achieve in a little more detail? The third one looks like ten times longer than the other two.

|improve this answer|||||
$\endgroup$
  • $\begingroup$ Thank you for the answer. I actually wrote wrongly the question, an I think the best thing to do I to write another question instead of change this. Sorry . $\endgroup$ – J.D. Nov 9 '19 at 22:20
  • $\begingroup$ The usual way is to edit your question through the grey edit button. Also, please avoid posting images of code or data when possible: the data subset would be better as correctly rendered text. $\endgroup$ – Romain Reboulleau Nov 10 '19 at 8:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.