In my following python code I successfully can connect to MS Azure SQL Db using ODBC connection, and can load data into an Azure SQL table using pandas' datafra
I have a raw dataframe(simplified) as below: ColumnA startime endtime A 2022-02-23 08:22:32.113000+00:00 2022-02-23 10:54:04.163000+00:00 A 2022-02-23 10:54:04
I want a column with day of year. How do I calculate day of the year with 15-minute interval data which are resampled to daily entries. The following code produ
i'am new to python. I have one txt file. it contains some data like 0: 480x640 2 persons, 1 cat, 1 clock, 1: 480x640 2 persons, 1 chair, Done. date (0.635s) Tue
Suppose I have a dataframe like this 0 5 10 15 20 25 ... action_0_Q0 0.299098 0.093973 0.761735 0.0
I am learning pandas and Data Science and am a beginner. I have a data as following Rahul 1 2 5 Suresh 4 2 1 Dharm 1 3 4 I would like it in my dataframe as Rah
How can I group by below table from Customer ID and Product Code and get them to one row as below using Python? Customer ID Product Code Days since the last
I'm trying to plot some points on a map, and when searching on the internet, I found [this][1] tutorial with Google Maps and Bokeh library. The problem is that,
I am very novice in python and I treat to extract emotions from sentence in datafram though senticNet this my code but its not correct I don't know what's the
In pandas, I have 2 columns, one of which is a dictionary and the other is a numerical column. When the dictionary column is not null, is there a time efficient
I have a csv file of several thousands of rows in multiple languages and I am thinking of using google cloud translate API to translate foreign language text in
I have data that I would like to train an ml classifier on. The data is in wide format. I'd like to do a boxplot with searborn sns.boxplot(x='
I am currently using random_sample to generate weightage allocation for 3 stocks where each row values add up to 1 and I rounded them to 2dp. weightage=[] n = 0
I have a data frame with many column. One of the column is named 'attributes' and in it has a list of dictionary with keys and values. I want to extract each ke
a= {'A' : [1, 2,3,4], 'B' : ['FOOTBALL','BASKETBALL','HANDBALL','VOLLEYBALL'], 'C' : [[5,10,15,40],[1,4],[20,10,40],[10,40]] } How can I remove the element 40
I am trying to apply my own function. Below you can see the data and function. import pandas as pd import numpy as np data_test = { 'sales_201
I'm doing some modification to a CSV via pandas. For one of the situations, I want to use parse a URL into a list, grab the last two items of that list, and out
I've looked around for a solution and tried filtering my df to where the longitude and latitude are not null but to no avail. This is my first time using geopy
I'm trying to join column values into new column but I want to skip nan values: df['col'] = 'df['col1'].map(str) + ',' + df['col2'].map(str) + ',' + df['col3'].
What is pivot? How do I pivot? Is this a pivot? Long format to wide format? I've seen a lot of questions that ask about pivot tables. Even if they don't know t