Questions tagged [pandas]
Pandas is a Python library for data manipulation and analysis, e.g. dataframes, multidimensional time series and cross-sectional datasets commonly found in statistics, experimental science results, econometrics, or finance. Pandas is one of the main data science libraries in Python.
pandas
17
questions
0
votes
0
answers
8
views
Python Pandas multi-indexing across column levels using .loc
I am still new to python and pandas and want to know if there's a better way to go about the indexing problem I'm having. Since I've seen people doing pretty slick things on this site, beyond what I ...
0
votes
3
answers
43
views
Python, pandas parse number and string from string
In Python, I want to parse a string and return the numeric portion (may or may not have decimal point) as a float and return the suffix as a string. Examples are:
7.1inch -> 7.1, inch
7.1” -> 7....
-2
votes
0
answers
16
views
how to iterate efficiently through files in order to concatenate them to one dataframe
The data is the physionet 2019 data. It consists of about 40 000 patient records. One file stands for one patient and i want all data in one dataframe.
I have read that when I want to concatenate ...
0
votes
1
answer
25
views
Why the warning: "FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas"?
I am not understanding why this particular warning is being raised, given the circumstances. When applying a function to a numeric series, it raises FutureWarning: Setting an item of incompatible ...
0
votes
2
answers
35
views
Inserting a column into a csv that pulls from the name of the file in python
I'm trying to insert a column of "StatementDate" into a csv, where the date is in the title of the csv. This is dynamic and will change week to week.
The formatting of the title is the same, ...
3
votes
4
answers
64
views
How to filter Pandas Dataframe to integer values?
I have a dataframe column with string values. I want to filter to the rows that have integer. I can do the below to find if it's numeric, but this would return floats as well.
result = pd.to_numeric(...
1
vote
2
answers
37
views
In a dataframe,replace values from one column with multiple conditions and not in the same row to another column
I am trying to transfer values from one column to another column in a dataframe, with multiple conditions and not in the same row.
Values from Columns 'BEGUZ_H' and 'ENDUZ_H' to Columns 'BEGUZ' and '...
0
votes
1
answer
32
views
assign rank and maintain sequence across duplicates
I'm assigning an incremental rank based on a value, but need to assign the same rank to duplicate values and maintain the overall sequence.
Instead of this:
Value
Rank
400
1
500
2
175
3
250
4
...
0
votes
1
answer
43
views
What is the most efficient way to multiprocess over a very large dataframe?
I have a large Dataframe that I need to do a lot of matching operations over, and in the past have always used the below method for doing it. However, the Dataframe that I am currently attempting to ...
4
votes
2
answers
49
views
How do I categorize projects in a dataframe according to its title?
I have a dataframe where I want to categorize energy releated projects in 4 different topics according to its title.
For that I want to use pre-defined keywords to identify which topic the project ...
0
votes
0
answers
46
views
Why data that are being written to excel are not starting from the 'A' column?
I'm using pandas to copy data from one excel to another and the data are being copied just not at the right place.
I have this function that reads the data:
def updated_file(self, progress_bar):
...
1
vote
0
answers
29
views
Is using a Pandas Dataframe as a read-only table scalable in a Flask App?
I'm developing a small website in Flask that relies on data from a CSV file to output data to a table on the frontend using JQuery.
The user would select an ID from a drop-down on the front-end, then ...
0
votes
0
answers
24
views
Pandas check if a column has NaT type, unable to find date diff with NaT values [duplicate]
I have StartDate and ExitDate two columns in my dataframe with NaT values in ExitDate column
I wish to create a third column Tenure by finding Difference between ExitDate and StartDate.
StartDate ...
3
votes
1
answer
34
views
Python Pandas difference in boolean indexing between ~ != and ==
I am confused about different results of boolean indexing when using ~ after != versus when using just ==
I have a pandas df with 4 columns:
dic = {
"a": [1,1,1,0,0,1,1],
"b&...
0
votes
0
answers
11
views
FutureWarning in emobpy: incompatible dtype assignment with Pandas DataFrame
I am using the emobpy library to set custom rules for a mobility analysis, but I encounter a FutureWarning about incompatible data types when trying to modify DataFrame items. Here's the problematic ...
-3
votes
0
answers
23
views
لا استطيع ايجاد المكاتب التي قمت بتنزيلها مثل pandas opencv [closed]
مشكلتي هي انني قمت بتنزيل المكاتب مثل numpy - opencv - pandas و الكثيير من المكاتب التي قمت بتنزيلها من واجهه الاوامر في نظام التشغيل ويندوز 10 ولكن عند الدخول الى بيئه برمجه بايثون وهي ال pycharm و ...
-1
votes
1
answer
35
views
how do you merge values in rows, replace nan values in pandas
I am doing some manipulation on a data frame:
df
Node Interface Speed carrier 1-May 9-May 2-Jun 21-Jun
Server1 internet1 10 ATT 20 30 ...