1

I need some help due to my research about that topic was not satisfying. I hope you guys can help me out. Lets say we have a DataFrame like:

df = DataFrame(A = 1:10, B = 11:20, C = rand(10))

But now I want to join "A" and "B" into one single column so it goes from 1 to 20. How do I do that...? :/

Thanks for our help!

2
  • and what do you want to happen to column :C? Or more generally - what output would you expect? Commented Sep 28, 2021 at 8:47
  • :C could go on to rand(20) it does not matter. Commented Sep 28, 2021 at 9:04

1 Answer 1

0

Given how I understood what you need do:

DataFrame(AB=[df.A; df.B], C=rand(20))

but maybe you need something else. In such a case please comment.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.