Category "pandas"

How to use Python faker for dependent columns

Scenario If column1 = ‘Value’ then column2 = ‘AAA’ How can we use faker to generate mock data for these dependent columns. Need to consi

Show Pandas Dataframe in for loop

I have a for-loop in which I build a pandas dataframe and everytime the loop starts over, the dataframe is updated. What I would like to do is to depict this ta

Sort pandas dataframe in very special order

I want to do a very special order in pandas dataframe. I have two separated dataframes: dataframe a and dataframe with different sizes. Example: dataframe a si

Trying to rename repeated columns in pandas DataFrame

I have a list of duplicate columns in my DataFrame (named as df here in the code) and I am trying to rename duplicate columns by adding a number in the end. For

How to convert road lane coordinates to tensors in Python?

I am trying to develop a Lane Detector using PyTorch. Basically, I'm reading the video frame by frame using cv2, then finding edges using Canny Edge Detector an

Datetime + String from a Pandas table into a new table. One line of code

I'm a beginner at python. I'm moving specific cells/scalars from one Dataframe to another. I'm trying to work out why my first block of code didn't work but my

Where is pandas.tools?

After installing pandas: idf:~/Documents/python/plot$ pip3 install pandas --user Collecting pandas Using cached https://files.pythonhosted.org/packages/f9/e1

Saving Pandas dataframe to SharePoint location as csv file

I want to save my transformed dataset to csv on SharePoint location. Can anyone help with how to approach. I have gone through Libraries shareplum but they read

Apply column name to row values unless nan or null

I'm attempting to add the column name of a dataframe to each row containing a non null value. A sample data set I am working with is: ID County Other

Read csv from Azure blob Storage and store in a DataFrame

I'm trying to read multiple CSV files from blob storage using python. The code that I'm using is: blob_service_client = BlobServiceClient.from_connection_string

How to convert CSV to multi level nested JSON in Python

How to convert CSV to nested JSON in Python This is related to something like this. I want to convert a flat dataframe file to Nested JSON format: I have a csv

appending rows to pandas dataframe results in duplicate rows

here's a MWE that illustrates a problem I'm having, where incrementally saving values to a dataframe over the course of a series of loops results in what looks

Is there a version of Pandas that will work with MicroPython?

I have a program that utilizes Pandas and Numpi which I want to operate on an ESP32 micro controller. Is there a version of Pandas and Numpi that will work on

how to find no of categorical columns and numerical columns in dataset

I need to find number of numerical and categorical columns Check how many categorical and numerical columns are there Categorical - object type Numerical -

How do I get rid of abnormalities from Pandas?

If I want to remove values that do not exist between -2σ and 2σ, how do I remove outliers using iqr? I implemented this equation as follows. iqr = d

TypeError: Invalid text_input type <class 'pandas.core.frame.DataFrame'> (required str or OrderedDict)

from textattack.augmentation import EasyDataAugmenter eda=EasyDataAugmenter() eda.augment(train) Error on this code The "train" data type is dataframe. and the

Pandas pipeline with conditions

I have a Pandas pipeline and would like to use either count or mean function based on a boolean variable. I came out with the following solution: import panda

How to make path using pandas dataframe as reference

I plan to make hundreds of dataframe with using Excel in hundreds of folders. Reference table: Folder Category Sub Cat

Find difference between a set of csv files in folder A compared to set of csv files in folder B

There are a number a files that need to be compared for differences in their rows; difference not as in subtraction but as in what values are different for each

How to Access Private Github Repo File (.csv) in Python using Pandas or Requests

I had to switch my public Github repository to private and cannot access files, not with access tokens that I was able to with the public Github repo. I can a