Python Forum
Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 20,242
» Latest member: johnsonlucas83
» Forum threads: 38,777
» Forum posts: 175,796

Full Statistics

Online Users
There are currently 48 online users.
» 1 Member(s) | 41 Guest(s)
Google, Applebot, Bing, AOL, Mojeek, buran

Latest Threads
I’m building a Python Dat...
Forum: GUI
Last Post: tsgiannis
54 minutes ago
» Replies: 2
» Views: 112
[split] print two differe...
Forum: General Coding Help
Last Post: Gribouillis
10 hours ago
» Replies: 1
» Views: 50
Data Science
Forum: Data Science
Last Post: mamta25
10 hours ago
» Replies: 3
» Views: 2,578
Two arguments in input fu...
Forum: General Coding Help
Last Post: Pedroski55
Yesterday, 12:56 AM
» Replies: 4
» Views: 154
Backward compatibility qu...
Forum: News and Discussions
Last Post: buran
Nov-08-2025, 10:39 AM
» Replies: 3
» Views: 138
[openpyxl] Set the lockin...
Forum: General Coding Help
Last Post: Pedroski55
Nov-07-2025, 11:59 AM
» Replies: 3
» Views: 136
New Users Introduce Yours...
Forum: Bar
Last Post: BelleroDev
Nov-07-2025, 09:09 AM
» Replies: 452
» Views: 375,399
Best book on learning Pyt...
Forum: News and Discussions
Last Post: mamta25
Nov-07-2025, 06:07 AM
» Replies: 2
» Views: 3,385
Recommend me a Python boo...
Forum: Data Science
Last Post: mamta25
Nov-06-2025, 08:33 AM
» Replies: 7
» Views: 5,584
Code runs perfectly and j...
Forum: General Coding Help
Last Post: noisefloor
Nov-05-2025, 05:56 PM
» Replies: 2
» Views: 213

 
  How to access previous row using itertuples
Posted by: SriRajesh - Feb-04-2022, 02:16 PM - Forum: General Coding Help - Replies (7)

Hi,
I have df with 10K rows, and if I use iterrows its become slower. Then I use itertuples & getattr. How ever I also need to access previous row. ..... More

Print this item

  Append files and add column with last part of each filename
Posted by: NiKirk - Feb-04-2022, 07:17 AM - Forum: General Coding Help - No Replies

I hope one of you are willing to help a complete Python beginner. I have managed to create my first script where I append multiple excel files in a fo..... More

Print this item

  I need to copy all the directories that do not match the pattern
Posted by: tester_V - Feb-04-2022, 04:36 AM - Forum: General Coding Help - Replies (7)

Greetings!
I need to copy all the directories that do not match the pattern:
8 alphanumeric characters all capital, underscore, and the 4 digits at ..... More

Print this item

  Preventing Duplicate Placement in 2D Array
Posted by: nickdavis2017 - Feb-03-2022, 10:37 PM - Forum: General Coding Help - Replies (2)

Hello all,

I'm writing a code to simulate respiratory virus propagation in a population. The code is massive, so attached is a small tidbit of it. Th..... More


Attached Files

.py   vm_placement.py (Size: 607 bytes / Downloads: 299)
Print this item

  arkanoid / breakout clone
Posted by: flash77 - Feb-03-2022, 06:39 PM - Forum: Game Development - Replies (2)

Hello,
I'm trying to code an arkanoid / breakout clone.
I have to check if the ball collides with the paddle or with one of the bricks (Later I want..... More


Attached Files

.txt   ball.txt (Size: 1.41 KB / Downloads: 312)
.txt   brick.txt (Size: 717 bytes / Downloads: 336)
.txt   main.txt (Size: 2.98 KB / Downloads: 323)
.txt   paddle.txt (Size: 506 bytes / Downloads: 304)
Print this item

  can re do this?
Posted by: Skaperen - Feb-03-2022, 06:23 PM - Forum: News and Discussions - Replies (15)

maybe re can do this but regular expressions just make no sense in my mind. i need to split a string with the separator(s) being any co..... More

Print this item

  String Matching Using python
Posted by: SathiyaBeegam - Feb-03-2022, 06:11 PM - Forum: Data Science - Replies (2)

Hi,

I have two files with Item names. I have to match Item name from one file to another using python. I tried fuzzywuzzy and RapidFuzzy, but the m..... More


Attached Files

.xlsx   File_ToMatch.xlsx (Size: 11.72 KB / Downloads: 0)
.xlsx   Master_File.xlsx (Size: 16.06 KB / Downloads: 0)
Print this item

  ModuleNotFoundError only if script is launched by cron
Posted by: Charles33 - Feb-03-2022, 05:19 PM - Forum: General Coding Help - Replies (8)

Hello

I want to launch a python program at start of the system, which uses openCV.
unfortunately, I get a ModuleNotFoundError on cv2 ONLY when the..... More

Print this item

  using Python pyserial
Posted by: ajitnayak87 - Feb-03-2022, 04:58 PM - Forum: General Coding Help - Replies (3)

Here is a sample code is written for pyserial. I need some help in improvising the code.

WSt will have
systemdate
systemtime

Serial data rece..... More

Print this item

  Need Help writing data into Excel format
Posted by: ajitnayak87 - Feb-03-2022, 04:49 PM - Forum: General Coding Help - Replies (8)

I have the below code. I have one counter. if counter less than value set value It should write the value into excel.
in below code I could see coun..... More

Print this item

  Text Order is Kinda Messed Up?
Posted by: Prithak - Feb-03-2022, 04:00 PM - Forum: General Coding Help - No Replies

This code doesn't really work on it's own but you have to make an index.html file with the code below the python code.. Without getting out of context..... More

Print this item

  Getting pip to work
Posted by: hammer - Feb-03-2022, 03:38 PM - Forum: General Coding Help - Replies (8)

I get a syntax error trying to use pip. See several attempts below.

[python]
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linu..... More

Print this item

  Web scraper
Posted by: tomenzo123 - Feb-03-2022, 12:03 PM - Forum: Web Scraping & Web Development - Replies (8)

Hi everyone, so this is my first time ever using python script, and I would like to create an web scraper, to scrap prices, names, dates, and stuff li..... More

Print this item

  Save data frame to .csv df.to.csv()
Posted by: mcva - Feb-03-2022, 11:48 AM - Forum: General Coding Help - Replies (1)

Hi everyone

I need to write a .csv file at each iteration of the following loop. I need to change the name of the .csv file at each iteration. The na..... More

Print this item

  How to immediately kill and restart a thread while using a time.sleep() inside it?
Posted by: philipbergwerf - Feb-03-2022, 11:22 AM - Forum: General Coding Help - Replies (4)

I made this little example where a cursor is blinking on the canvas:
[python]from tkinter import *
from threading import Thread
from time import sleep..... More

Print this item

  How to vectorize a calculation
Posted by: Tuxedo - Feb-03-2022, 01:14 AM - Forum: General Coding Help - Replies (2)

I have a 1D array containing ending values of a financial computation that has n elements and a matrix of inflation factors that has n rows and w colu..... More

Print this item

  Bouncing Ball
Posted by: Fell - Feb-03-2022, 12:15 AM - Forum: GUI - Replies (1)

Hi,

New(ish) Python user here. I'm trying to create a (Windows) program that places a sprite (a small bouncing ball) directly on the screen, on top..... More

Print this item

Bug beginner attempting to make chatbot
Posted by: MonikaDreemur - Feb-02-2022, 09:38 PM - Forum: General Coding Help - Replies (1)

hi! i'm pretty new to python- i mean, i've taken classes, but i haven't taken college-level ones or anything. anyway, could you help me debug this bit..... More

Print this item

  filtering python code the interpreter reads
Posted by: Skaperen - Feb-02-2022, 08:29 PM - Forum: News and Discussions - No Replies

i am looking for a way to run CPython while also having my own script filtering (and changing) the code as it is read from the file. this would be st..... More

Print this item

  How a QMainWindow can open a dialog?
Posted by: panoss - Feb-02-2022, 07:54 PM - Forum: GUI - Replies (4)

I have the following code which has two classes:
-Ui_dialog_in
-myWindow

What I 'm trying to achieve is:
-when myWindow opens, to open a Ui_dia..... More

Print this item

Exclamation Phyton Metin2 Game Left Click not working. Help
Posted by: anonym35 - Feb-02-2022, 07:01 PM - Forum: General Coding Help - No Replies

Hello guys.
After processing the image with phyton in Metin2 game, I want to send the cursor over the image and press the left button. but due to a p..... More

Print this item

  text get index problem
Posted by: philipbergwerf - Feb-02-2022, 06:42 PM - Forum: GUI - Replies (2)

I made a small example of my problem:
[python]from tkinter import *

root = Tk()

text = Text(root)
text.pack()

text.insert('insert', 'some t..... More

Print this item

  longest palindromic subsequence DP solution bug
Posted by: usercat123 - Feb-02-2022, 03:52 PM - Forum: General Coding Help - Replies (9)

Hey,

I am trying to code the following problem: given a string find the length of the longest palindromic subsequence and for the input "GATTACAGAT..... More

Print this item

  When did the number got included in the list?
Posted by: Frankduc - Feb-02-2022, 03:42 PM - Forum: General Coding Help - Replies (14)

Hello,

I am puzzle how to understand when integer are integrated to a list. Here's an example i pick up.

[python]import itertools

def prime_n..... More

Print this item

  Using multiprocessing to produce objects for i in range
Posted by: lucasrohr - Feb-02-2022, 11:13 AM - Forum: General Coding Help - Replies (6)

So I wrote this massive code filling a hotel with fictional objects (i.e. people) with a bunch of attributes with random values, then making a statist..... More

Print this item

  pivot table (excel vs python)
Posted by: Bric - Feb-02-2022, 10:11 AM - Forum: Data Science - Replies (1)

Hello, I'm looking to do a pivot table of a csv file on Python, usually I do it on Excel but I'm looking to automate it. I started with this code
[py..... More

Print this item

  [split] IS there a way to preserve some order in a tSNE/PCA plot?
Posted by: majidvaghari - Feb-02-2022, 08:40 AM - Forum: Data Science - No Replies

Dear Sir/Madam,

I have a question about t-SNE plots?

How can I make a t-SNE plot like the picture:

It’s used to reduce dimensions from6 two 2..... More


Attached Files

Thumbnail(s)
   
Print this item

  How can I get the Middle English and Modern English from this page?
Posted by: Pedroski55 - Feb-02-2022, 04:45 AM - Forum: Web Scraping & Web Development - Replies (5)

I want to get the text of this page because it contains Middle English and Modern Engl..... More

Print this item

  Looking to make a price checking script
Posted by: 6010fd12 - Feb-02-2022, 01:54 AM - Forum: Web Scraping & Web Development - Replies (1)

Spent 10 hours watching some python tutorials so I'm familiar with the very basics of python. I'm looking to make a program with python that:

Print this item

  Print controlled with global-var
Posted by: fmr300 - Feb-01-2022, 10:58 PM - Forum: General Coding Help - Replies (3)

In a script I'm working on, sometimes I'd like to turn off some of the print statements that are informative, while leaving the true-warning print's o..... More

Print this item

  Issue when using open() in converted exe
Posted by: skakalpes - Feb-01-2022, 06:52 PM - Forum: General Coding Help - Replies (2)

Hi. I'm trying to solve a critical issue that prevents to continue working on my project. I think it's something easy to solve and I'm probably just m..... More

Print this item

  a general question
Posted by: barryjo - Feb-01-2022, 06:04 PM - Forum: General Coding Help - Replies (5)

I have the following code, the first method, SendCommandV1, was given to me. My question is do I have to pass ser as an argument when I call SendComm..... More

Print this item

  Pendulum Help Please
Posted by: bill_z - Feb-01-2022, 02:49 PM - Forum: General Coding Help - Replies (6)

In a previous thread, it was suggested I use pendulum to get daylight saving time information. At that time, I was having issues with my Python versi..... More

Print this item

  Using like statement in pandas df
Posted by: bnadir55 - Feb-01-2022, 02:00 PM - Forum: General Coding Help - Replies (1)

Hello,
I have a function in which I want to return in a column all the values that like ABC and return it in a new column as ABC , but I get an erro..... More

Print this item

  remove colon if value is None
Posted by: wardancer84 - Feb-01-2022, 12:57 PM - Forum: General Coding Help - Replies (7)

hey,

i have this comprehension...

extracted_tags = [li['tags'] for li in rule["commands"] if li['tags'] is not None]
wor..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  [Tkinter] I’m building a ... 54 minutes ago tsgiannis tsgiannis GUI
  [split] print two differe... 10 hours ago Reema Gribouillis General Codin...
  Data Science 10 hours ago Oshadha mamta25 Data Science
  Two arguments in input fu... Yesterday, 00:56 Alfredd Pedroski55 General Codin...
  Backward compatibility qu... 11-08, 10:39 yutaozhou buran News and Disc...
  [openpyxl] Set the lockin... 11-07, 11:59 BelleroDev Pedroski55 General Codin...
  New Users Introduce Yours... 11-07, 09:09 Yoriz BelleroDev Bar
  Best book on learning Pyt... 11-07, 06:07 almahdi mamta25 News and Disc...
  Recommend me a Python boo... 11-06, 08:33 woodward mamta25 Data Science
  Code runs perfectly and j... 11-05, 17:56 compuman145 noisefloor General Codin...
  Natural language processi... 11-05, 14:03 maaaa2401 offsoar Homework
Most views
  The best Prog... 578740
  Tutorial Requ... 509454
  Web Scraping ... 441874
  Newbie with P... 385839
  New Users Int... 375399
Most reputation
buran 581
snippsat 510
Larz60+ 452
Gribouillis 362
deanhystad 328
Most replies
  New Users Int... 452
  [book] Variou... 188
  CKEditor / Ri... 100
  moving from t... 95
  Free keys and... 91
Top posters
Larz60+ 12102
buran 8194
snippsat 7388
deanhystad 6907
metulburr 5151
Top referrers
Googlepro 23
python 6
metulburr 6
NonEntity 5
buran 3
Newest members
johnsonlucas83 Today
ColorTig Today
AcoolPurpleOne1863 Today
racingsubby Today
Reema Today

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020