Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread Thomas Passin via Python-list
On 1/21/2024 1:25 PM, marc nicole wrote: It is part of a larger project aiming at processing data according to a given algorithm Do you have any comments or any enhancing recommendations on the code? I'm not knowledgeable enough about either pandas or numpy, I'm afraid, just very basic usage.

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread marc nicole via Python-list
It is part of a larger project aiming at processing data according to a given algorithm Do you have any comments or any enhancing recommendations on the code? Thanks. Le dim. 21 janv. 2024 à 18:28, Thomas Passin via Python-list < python-list@python.org> a écrit : > On 1/21/2024 11:54 AM, marc ni

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread Thomas Passin via Python-list
On 1/21/2024 11:54 AM, marc nicole wrote: Thanks for the reply, I think using a Pandas (or a Numpy) approach would optimize the execution of the program. Target cells could be up to 10% the size of the dataset, a good example to start with would have from 10 to 100 values. Thanks for the r

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread marc nicole via Python-list
Thanks for the reply, I think using a Pandas (or a Numpy) approach would optimize the execution of the program. Target cells could be up to 10% the size of the dataset, a good example to start with would have from 10 to 100 values. Let me know your thoughts, here's a reproducible example which I

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread Thomas Passin via Python-list
On 1/21/2024 7:37 AM, marc nicole via Python-list wrote: Hello, I have an initial dataframe with a random list of target cells (each cell being identified with a couple (x,y)). I want to yield four different dataframes each containing the value of one of the contour (surrounding) cells of each s

How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread marc nicole via Python-list
Hello, I have an initial dataframe with a random list of target cells (each cell being identified with a couple (x,y)). I want to yield four different dataframes each containing the value of one of the contour (surrounding) cells of each specified target cell. the surrounding cells to consider fo