Python Forum
Converting SQL Code To Python Code Query
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Converting SQL Code To Python Code Query
#11
I understand buran,

To keep on topic in this Thread, what should I type, to do a conversion of the SQL Code, to Python Code ? Those lines of Code converted, to Python Pandas Code, should help me with the issue I have.

Regards

Eddie Winch
#12
(Feb-13-2020, 09:43 PM)eddywinch82 Wrote: Thanks for that info Larz60+, I see you can't simply, have SQL code translated into Python Code, using SQLAlchemy ?

Code has to be executed, as part of querying a database etc. Because at the moment, I only want, direct translation of that SQL Code, to Python Code.

Eddie

It does not matter what language you pick, you will not be able to translate the artifact of SQL you posted into it because it’s copying data directly into a temp table on the server!

And executing this type of thing on a client could be problematic in any case if it’s a large data set since all you are doing is dragging data across the wire only to push it back over again.

If you tell us what you are trying to achieve, perhaps we can suggest a better way of achieving it.
There is no passion to be found playing small - in settling for a life that is less than the one you are capable of living.
#13
Hi jim2007,

On Page 3 of the Thread, the Link I provided in my post earlier, I talk about the issue I am having. That part of SQL Code I posted, is significant, because it deals, with adding of two particular Numerical values together, which I wan't to do in the Python Pandas Code, I have at the moment, which I run in Jupyter Notebook.

So if someone could tell me what the Python Code, equivalent would be, for those lines of SQL Code. I could change my current Code hopefully, to achieve the Output DataFrame I want.

Regards

Eddie Winch
#14
I am closing this thread now, there is no sense in continuing here.
Keep the discussion in the original thread.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs



Possibly Related Threads…
Thread Author Replies Views Last Post
  Mathematica code vs Python MiloChocolatito 0 278 Mar-31-2025, 06:32 AM
Last Post: MiloChocolatito
  I am getting an IndentError on my python code in VS Code and i dont know why jcardenas1980 11 3,230 Mar-22-2025, 09:49 AM
Last Post: Pedroski55
  I trying to automate the Variable Logon button using the python code but I couldn't surendrasamudrala 0 233 Mar-07-2025, 05:02 AM
Last Post: surendrasamudrala
  How do i run python code? smattiko83 5 577 Mar-06-2025, 09:20 PM
Last Post: ArchieLinux
  I'm new to Python - can someone help with this code as it is not working? lminc123 1 474 Feb-13-2025, 06:13 PM
Last Post: lminc123
  I cannot create a virtual environment on visual studio code using python Willem_Aucamp316 2 2,708 Nov-27-2024, 02:20 PM
Last Post: menator01
  CLI to python code azxo1 11 2,044 Oct-21-2024, 08:32 AM
Last Post: azxo1
  PC why serial code = converting to ascii ? trix 11 2,191 Oct-12-2024, 11:10 PM
Last Post: deanhystad
  Algorithm for extracting comments from Python source code Pavel1982 7 2,714 Aug-28-2024, 02:50 AM
Last Post: timothyferriss
  Coding help required in Python using VS Code KakashiSenpai 3 1,066 Jul-04-2024, 12:32 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020