Skip to main content

All Questions

Tagged with or
1 vote
3 answers
73 views

I have a dataset with a 'Time' column; for 2 dates the time is incorrect and I need to move it back by 1 hour. This is what my dataframe looks like: Date Time 05.01.2026 17:00 06.01.2026 ...
AjWinston's user avatar
  • 161
0 votes
1 answer
74 views

TLDR; I'm trying to understand why list-like methods in dataframes behave the same as the list-like methods in Series. Basically, in Series, if you use apply or transform on list-like methods, they ...
Dhruv's user avatar
  • 619
-1 votes
0 answers
61 views

The question is: are the proposed methods for flattening a given dataframe efficient enough, or could they be further refined? An example of a pandas input dataframe columns (it is a given, cannot be ...
complicat9d's user avatar
0 votes
0 answers
100 views

I am using Flet 0.80.4 with Python 3.11. The user should be able to upload a file via a button. I want to process this file with Polars or Pandas. I found some examples of how to handle file uploads, ...
Anastasia Volkova's user avatar
4 votes
0 answers
126 views

I have the following data: import polars as pl dat = pl.DataFrame({"x": ["a", "b"]}) and I have a function where the user can replace some values in x. I would like to ...
bretauv's user avatar
  • 8,985
2 votes
3 answers
81 views

I work with Pandas, which is the project I'm currently working on. This is the dataframe: property_type place_with_parent_names region lat-lon area_m2 price_usd lat lon 0 apartment |...
Borhen Kalboussi's user avatar
3 votes
1 answer
59 views

With a DataFrame, I can easily pivot this table id subject exam grade 1 maths theory 10 1 maths practice 12 3 physics theory 15 Into this table id {"maths","theory"} {"maths&...
Samuel Allain's user avatar
Advice
0 votes
5 replies
69 views

I am a Python developer, but I don't understand one thing: what are the numpy axis? Sometimes, when I use Sklearn, I have errors about axis. And I need explanations about values and reshape functions.
Fotosintez's user avatar
2 votes
2 answers
99 views

I have a Pandas dataframe which I need to both restructure, and modify slightly. I have a solution that works, but is naive and slow--I will post that below. Essentially, I have spatial data that I ...
Andy K.'s user avatar
  • 397
2 votes
1 answer
90 views

I keep getting a ChainedAssignmentError when adding a conditional to my code. In this basic example I am checking to see if column "one" is an "e" and if so then set the "...
Tim Romero's user avatar
5 votes
3 answers
152 views

I am working with a pandas DataFrame that has a MultiIndex (two levels) for columns. I am trying to rename specific columns using a dictionary of tuples, but the column names remain unchanged. import ...
Jianhang LIn's user avatar
3 votes
1 answer
132 views

(Similar questions with this warning always wind down to the same thing described in the docs; use .loc however I'm already doing that and the line that should be in the error to use .loc is hence ...
Quinten's user avatar
  • 33
3 votes
1 answer
198 views

I am attempting to construct bins for a large dataset, such that the subset of data within each bin conforms well to an exponential distribution. The basic structure of the data looks like this, but ...
Christoph543's user avatar
2 votes
1 answer
110 views

I have a polars dataframe with a date column I've built with the format %YW%W. I want to convert the column to a date, so I wrote the following snippet: agg_pivoted_df = pivoted_df.with_columns([ ...
Pollastre's user avatar
  • 338
-3 votes
0 answers
77 views

How can I select rows from a DataFrame based on values in some column in Pandas? Should I use the groupby method? If so I'm not sure how to implement the condition. Also how to create nodes based on ...
user12345's user avatar

15 30 50 per page
1
2 3 4 5
9914