I have products CSV file and I am trying to read this file with pandas python but i get this error my code import pandas as pd df = pd.read_csv('D:\\work\\am
I have two dataframes, and I am struggling to match the unique ids that I created in df1 to df2 based on 'name' and 'version' values. I need to add a column to
In pandas 1.4.0: append() was deprecated, and the docs say to use concat() instead. FutureWarning: The frame.append method is deprecated and will be removed fr
I try to generate a json file or dict rom my datframe (grouping the columns) my datFrame is df1 = pd.DataFrame({ 'USER': ['ALL','ALL','BOB','STEVE',
I try to generate a json file or dict rom my datframe (grouping the columns) my datFrame is df1 = pd.DataFrame({ 'USER': ['ALL','ALL','BOB','STEVE',
Want to add logic that calculates and outputs truckloads able to be built each day. Still want this broken out by ship-to party (so 1 ship-to party per shipment
Goal: I have collected hundreds of reddit posts' details in Excel sheets. Now, I want to collect comments on these Reddit posts using PRAW. Method: At first, I
I didn't find a solution for this: From a dataframe I generate an excel and some columns need to be in format hh:mm:ss (with no limit to 24h, for example a valu
I'm trying to import Python Tensorflow custom model to spring-boot using DJL Tensorflow, and the model gets Pandas DataFrame as both input and output. I'm wonde
How could I convert symmetric matrix: A B C D A 1 2 3 4 B 2 1 2 3 C 3 2 1 2 D 4 3 2 1 into adjacency matrix?: A A 1 A B 2 A C 3 A D 4 B A 3 B B 1 B C 2 B D
I have two dataframes: df = pd.DataFrame([{'A': -4, 'B': -3, 'C': -2, 'D': -1, 'E': 2, 'F': 4, 'G': 8, 'H': 6, 'I': -2}]) df2 looks like this (just a cutout; i
I'm trying to create a list of timestamps from a column in a dataframe, that resets after a certain time to zero. So, if the limit was 4, I want the count to ad
I'm using Pandas with latest sqlalchemy (1.4.36) to query a MS SQL DB, using the following Python 3.10.3 [Win] snippet: import pandas as pd
I have (in my opinion) a strange problem with python pandas. If I do: cc1 = cc.copy(deep=True) for the dataframe cc and than ask a certain row and column: p
Im trying to filter the data frame (stops_trips_vehicles) based on user input - specifying hour (departure_time column) and the stop name(stop_name column). Eac
If i have the following table: tibble(year = c("2020", "2020", "2020","2021", "2021", "2021"), website = c("facebook", "google", "youtube","facebook", "
I'm struggling with making my lists of strings a DataFrame because they are different sizes. So, I'm running code to get the length of the largest list and then
I have successfully read a csv file using pandas. When I am trying to print the a particular column from the data frame i am getting keyerror. Hereby i am shari
def read_text_file(file_path): with open(file_path, 'r') as f: stop_words(f.read()) # iterate through all file for file in sorte
I have a dataframe of x, y data and need to bin it into circles. Ie a grid of circles of certain size and spacing centered on some point. So for example some da