python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to set list of values present in pandas dataframe, based on groupby key?
I am using pandas.dataframe in python code to find total pending_count & list of ticket_ids for a priority (based on priority) as below.
df = pd.DataFrame({'priority': priority,
...
Tanuj Kathuria
Votes: 0
Answers: 1
Sanitizing SQL fstring query for psycopg2
I'm iteratively building up my SQL query to execute as such:
sql = "SELECT * FROM txs "
param_values = []
if params:
sql += f"WHERE name=%s"
...
gabbar0x
Votes: 0
Answers: 1
not result to fetch error when iterating through different tables with psycopg
I want to export several tables to .json file. First, I have query for those tables I want, matching some condition, the second query, build the json object that I want to store. I am using psycopg2,...
gcj
Votes: 0
Answers: 0
How to run PostgreSQL query which starts with "DO $$ " in Python
I have PostgreSQL query which starts with DO:
do
$$
DECLARE
temprow record;
BEGIN
for temprow in
select *
from generate_series(1, 100)
where generate_series % 2 = 0
...
S.Honcharov
Votes: 0
Answers: 1