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
  Why can I not see the code correctly in Python IDLE.? Trump 8 652 Apr-04-2024, 07:47 AM
Last Post: jonesphedra
Sad Selenium update broke python code genericusername12414 1 224 Mar-16-2024, 07:33 PM
Last Post: snippsat
  Algorithm for extracting comments from Python source code Pavel1982 6 500 Feb-28-2024, 09:52 PM
Last Post: Pavel1982
  Python best library for Excel reports & review of existing code MasterOfDestr 4 595 Feb-14-2024, 03:39 PM
Last Post: MasterOfDestr
Lightbulb python code debuging yunus 1 323 Feb-11-2024, 03:48 PM
Last Post: deanhystad
  Python code to set column width 1418 11 1,145 Jan-20-2024, 07:20 AM
Last Post: Pedroski55
  Python code for alignment and font size 1418 0 302 Jan-14-2024, 03:56 AM
Last Post: 1418
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 965 Nov-15-2023, 06:56 PM
Last Post: jst
  How to run detectron2, as python embedded code in C++, on GPU? hassaniqbal931 3 1,077 Nov-02-2023, 04:45 PM
Last Post: blabling2
  how include a python code in notpad++ plugin akbarza 2 620 Sep-25-2023, 08:25 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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