Skip to content
Advertisement

Tag: python

Get data from database and write it back in again

I have written a function by reading an excel file and writing it to the database. This works! Getting data from the database also works. Where I get stuck is at the point that the function should read each row, calculate it and write the result back to the database. I also want to find out how many rows were

Translate Oracle query into pandas dataframe handling

I have the below dataframe: PARAM1 PARAM2 VALUE A X TUE, WED A Y NO B X MON, WED B Y YES I would like a pythonic way of obtaining the distinct values of param1 that satisfy EITHER of these conditions: Their corresponding param2 = ‘X’ contains the string ‘MON’ Their corresponding param2 = ‘Y’ is equal to ‘YES’. In

Don’t save info in table

I am trying to save the information to the database in the following way: But I get the following error: Using next data: UPD: Check for data and types, get next UPD2: If I use next code, it’s work: But I want to change table Answer Issue resolved, it works:

Databricks error when change type column from string to numeric

I have a error like: com.databricks.backend.common.rpc.DatabricksExceptions$SQLExecutionException: org.apache.spark.sql.catalyst.parser.ParseException: no viable alternative at input ‘alter table x9concsheet5 Add netto_resultaat'(line 1, pos 29)* when i run this sql command in databricks: %sql alter table x9concsheet5 Add netto_resultaat numeric(17,2) The requirement is to change the column type from string to numeric from the temporary table x9concsheet5. Any suggestions? Answer you can use following command

Updating HTML Table Every 60 Seconds

I am trying to use an ajax call to update an HTML table every 60 seconds on a flask app. I am very new to flask and jquery, and followed this similar stackoverflow question: Python Flask Refresh table every 60 seconds However my table isn’t displaying any data. Currently my app.py file is setup as below: And my nfl_template.html: When

Advertisement