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
288,095
questions
0
votes
0
answers
21
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):
...
0
votes
0
answers
15
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
18
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 ...
1
vote
1
answer
24
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
30
views
Pandas.ExcelFile Include first header row but only searching on second header row
ugds = set()
for sheet_name in excel_data.sheet_names:
df = pd.read_excel(excel_data, sheet_name=sheet_name, header=1)
ugds.update(df["Pool\n Gestão"].unique())
for UGD in ugds:
...
0
votes
0
answers
9
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
22
views
لا استطيع ايجاد المكاتب التي قمت بتنزيلها مثل pandas opencv [closed]
مشكلتي هي انني قمت بتنزيل المكاتب مثل numpy - opencv - pandas و الكثيير من المكاتب التي قمت بتنزيلها من واجهه الاوامر في نظام التشغيل ويندوز 10 ولكن عند الدخول الى بيئه برمجه بايثون وهي ال pycharm و ...
-1
votes
1
answer
29
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 ...
0
votes
0
answers
20
views
text_auto Parameter Not Working in Plotly
The text_auto parameter for a Plotly Express bar chart is not functioning for me, despite seemingly correct syntax. I am using both Jupyter Notebook and Eclipse and the issue persists in both. Plotly ...
0
votes
2
answers
38
views
Sort Pandas dataframe by Sub Total and count
I have a very large dataset called bin_df.
Using pandas and the following code I've assigned sub-total "Total" to each group:
bin_df = df[df["category"].isin(model....
0
votes
3
answers
56
views
How to find rows with value on either side of a given value?
Python, Pandas, I have a dataframe containing datetimes and values.
# Create an empty DataFrame with 'timestamp' and 'value' columns
df = pd.DataFrame(columns=['timestamp', 'value'])
df.set_index('...
-1
votes
1
answer
31
views
pd.to_datetime() not consistently working to convert objects
I have been working with this data (csv) that exists in an AWS S3 bucket. When I am pulling the data I have to transform all the columns to their correct dtypes.
All other dtypes are working properly ...
1
vote
1
answer
66
views
How can I filter df “A” using as a condition a comparison to df “B”?
I’ve got 2 dataframes, dfA and dfB, with different shapes and with different orders. dfA is contained in dfB.
There are 3 columns in this example, “Job Title”, “Job Department” and “Job Salary”. dfA ...
-1
votes
0
answers
30
views
Index into fields of a DataFrame row without needing a row index? [duplicate]
In pandas, is there a way to work with one row of a DataFrame at a time, and for each row, indexing into the columns by name but without indexing into the rows? My current approach is (say) modifying ...
0
votes
1
answer
24
views
Pandas UDF to derive new column
In Spark/Databricks, I have a pandas dataframe with a string column. I need to perform multiple actions on this column (data cleansing type stuff), and produce a new column from the result.
Here's my ...