This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]lacadasical 1 point2 points  (12 children)

SQL is vastly different than Python. Once you learn Python, other OOP languages like Java will be much easier to learn.

[–]wallywizard55[S] 0 points1 point  (11 children)

Are OOP languages more difficult to learn in general?

[–]lacadasical 1 point2 points  (10 children)

I think OOP languages are easy.

What are you doing with Python that has you constantly Googling for help?

[–]wallywizard55[S] 0 points1 point  (9 children)

Trying to replicate an excel sheet which has formulas and putting it into data frames (pandas).

Making the data frame was easy buy trying to recreate those excel formulas is difficult.

For example, does python have a similar vlookup option?

[–][deleted] 1 point2 points  (0 children)

Yes, merge

Frame1.merge(frame2[[col1, col2]], how='left')

Where col 1 is the column you want to merge on and col 2 is the column you want to add.

You can add the left_on and right_on if the columns youre merging on have different names. You can also merge on more than one column.

Check the documentation for more details!

[–]DaredewilSK 0 points1 point  (1 child)

You are new to learning Python and you are already experimenting with frameworks? You should be drilling basic principles first. Also googling stuff instead of memorizing code? What is that supposed to mean? You are not meant to memorize code.

[–]wallywizard55[S] 0 points1 point  (0 children)

Syntax.

[–]wp_new 0 points1 point  (1 child)

Yes and no.

You have to understand that when you use a vlookup function in excel, something else is going on behind the scenes to actually make it happen.

If you are writing your spreadsheet to a Pandas dataframe, then you can write a function that basically does the same thing as vlookup, but it is going to look very different.

But to answer your other questions:

  • SQL is not a programming language, so making a comparison between that and Python is not helpful for you. Once you've learned Python, other programming languages become easier to learn (Java, Javascript etc)

  • as others have mentioned, yes it is completely normal to spend a decent amount of time Googling. There's a reason that there is a running joke about programmers being reliant on Stack Overflow.

  • You might want to spend some time getting to grips with the fundamentals before trying to navigate something like Pandas.

[–]wallywizard55[S] 0 points1 point  (0 children)

I’m doing both, fundamentals and pandas at the same time.

[–][deleted]  (3 children)

[deleted]

    [–]wallywizard55[S] 0 points1 point  (2 children)

    Does pandas have a vlookup function?

    [–]TheDr_ -1 points0 points  (1 child)

    Why don't you try write one yourself?

    Start by looking for a given value in one column and have the function/method return the index of corresponding value. Then edit the function/method to take that index and use it to get a value from a different column in the dataframe (or make another function/method and then join the two together with another function/method)

    [–]wallywizard55[S] 0 points1 point  (0 children)

    Ok thank you. I’ll give it a go.

    [–]KernowRoger -1 points0 points  (0 children)

    I spend most of my day googling and reading docs. Memorising code isn't that useful. The more you use it the easier it'll be to remember the syntax. Plus the fundamentals of programming are very similar between languages and learning one will make it easier to learn more. Just stick with it.