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,236
» Latest member: Cristiano
» Forum threads: 38,776
» Forum posts: 175,790

Full Statistics

Online Users
There are currently 31 online users.
» 0 Member(s) | 29 Guest(s)
Bing, Google

Latest Threads
Two arguments in input fu...
Forum: General Coding Help
Last Post: noisefloor
8 hours ago
» Replies: 3
» Views: 79
Backward compatibility qu...
Forum: News and Discussions
Last Post: buran
10 hours ago
» Replies: 3
» Views: 92
I’m building a Python Dat...
Forum: GUI
Last Post: tsgiannis
Yesterday, 07:29 PM
» Replies: 0
» Views: 67
[openpyxl] Set the lockin...
Forum: General Coding Help
Last Post: Pedroski55
Yesterday, 11:59 AM
» Replies: 3
» Views: 98
New Users Introduce Yours...
Forum: Bar
Last Post: BelleroDev
Yesterday, 09:09 AM
» Replies: 452
» Views: 375,040
Best book on learning Pyt...
Forum: News and Discussions
Last Post: mamta25
Yesterday, 06:07 AM
» Replies: 2
» Views: 3,362
Recommend me a Python boo...
Forum: Data Science
Last Post: mamta25
Nov-06-2025, 08:33 AM
» Replies: 7
» Views: 5,554
Code runs perfectly and j...
Forum: General Coding Help
Last Post: noisefloor
Nov-05-2025, 05:56 PM
» Replies: 2
» Views: 182
Natural language processi...
Forum: Homework
Last Post: offsoar
Nov-05-2025, 02:03 PM
» Replies: 2
» Views: 3,194
Can I develop a live vide...
Forum: Web Scraping & Web Development
Last Post: ankitsharma32
Nov-05-2025, 08:31 AM
» Replies: 5
» Views: 7,438

 
  function return boolean based on GPIO pin reading
Posted by: caslor - Jan-31-2023, 10:16 AM - Forum: General Coding Help - Replies (2)

Hi, i am not sure how to express it right but i wonder if there is a way to make a function to return a boolean value based of the Gpio readings

..... More

Print this item

  Multiply and Addition in the same loop statement with logic.
Posted by: joelraj - Jan-31-2023, 09:52 AM - Forum: General Coding Help - Replies (2)

Hi Python Community,

Greetings to you all !

After the if statement is passed through Reven and Rodd have to take two alternative indexes: one h..... More

Print this item

  Expand the range of a NumPy array?
Posted by: PythonNPC - Jan-31-2023, 02:41 AM - Forum: General Coding Help - No Replies

Hello everyone,

I have to agree that I am not great at coding and math but this forum has helped me a lot before and come seeking your help once ag..... More

Print this item

Lightbulb traceback and multi-line statement
Posted by: Skaperen - Jan-31-2023, 12:21 AM - Forum: News and Discussions - No Replies

IMHO a traceback should show more (within reason) of statements that are spread over multiple lines, and give the line numbers (first to almost last),..... More

Print this item

  I am looking for a FuzzyARTMAP library in Python language
Posted by: Cooketaker - Jan-30-2023, 07:14 PM - Forum: Data Science - Replies (2)

Good evening friends, I am looking for a python library of Fuzzy ARTMAP(Adadptive Resonance Theory),but the ones I find don't work well or I don't kno..... More

Print this item

  class Update input (Gpio pin raspberry pi)
Posted by: caslor - Jan-30-2023, 04:06 PM - Forum: General Coding Help - Replies (2)

Hi (Newbie here self taught first in C - Arduino and now try to learn Python but with my mind thinking like programing C and want to change that to py..... More

Print this item

  K Means Clustering
Posted by: antouanet - Jan-30-2023, 01:18 PM - Forum: Data Science - No Replies

Hello,

I am trying to study the changes in consumers' buying behavior before the pandemic and during the pandemic.
I have a dataset with sales of..... More

Print this item

  Create new dataframe from old dataframe
Posted by: arvin - Jan-30-2023, 11:09 AM - Forum: General Coding Help - Replies (3)

I have a pandas dataframe that has 2 columns
[Image: input.png]

,And I want to create a new dataframe with column ..... More

Print this item

  Images in a db
Posted by: DPaul - Jan-30-2023, 07:39 AM - Forum: Bar - No Replies

Hi,
I have asked this question a few months ago and the answer was:
"We see no reason to store images in a db, use a file pointer system"
Thiat is wha..... More

Print this item

  Print variable without '' and spaces
Posted by: arnonim - Jan-30-2023, 07:34 AM - Forum: General Coding Help - Replies (1)

Hello all,
could you help me with below question:

x = int(input("Enter the number:"))
a = str(([random.choice("ABCD" for _ in range(x)]))
var1 ..... More

Print this item

  Replace based on values in a file
Posted by: WJSwan - Jan-30-2023, 05:42 AM - Forum: Homework - Replies (2)

I have a file containing records with 4 values, eg:
1,Genesis,Gen,Gen
2,Eksodus,Eks,Exo
3,Levitikus,Lev,Lev
4,Numeri,Num,Num
5,Deuteronomium,Deut..... More

Print this item

  That compression method is not supported
Posted by: tester_V - Jan-30-2023, 02:37 AM - Forum: General Coding Help - Replies (9)

Greetings!
I used this snippet for a while but yesterday the script crashed...
with the error:
'That compression method is not supported'
I'm expe..... More

Print this item

  What is the cause of this error?
Posted by: Led_Zeppelin - Jan-29-2023, 08:13 PM - Forum: General Coding Help - Replies (3)

The following code generates an error as shown:

[python]
# random search logistic regression model on the sonar dataset
from scipy.stats import l..... More


Attached Files

Thumbnail(s)
   
Print this item

Question Inserting Numerical Value to the Element in Optionlist and Printing it into Entry
Posted by: drbilgehanbakirhan - Jan-29-2023, 06:17 PM - Forum: General Coding Help - Replies (1)

Hello. I'm just learning Python. I have confronted a problem in my study.

I have an optionlist for building types (Residential, Museum, Hospital, H..... More

Print this item

  Why doesn't this code work? What is wrong with path?
Posted by: Melcu54 - Jan-29-2023, 09:13 AM - Forum: General Coding Help - Replies (7)

hello, I have an error on the code below. Ths code converts all txt files into docx, from the same folder. But I have an error on path, I try many com..... More

Print this item

  Checking if a string contains all or any elements of a list
Posted by: k1llcod3 - Jan-29-2023, 02:20 AM - Forum: General Coding Help - Replies (1)

so i have some keywords in a list and i want to check if a string contains any or all of those keywords. E.g
[python]
teststring = 'this is a test s..... More

Print this item

  Use a class type in it
Posted by: MathisDELAGE - Jan-28-2023, 10:03 PM - Forum: General Coding Help - Replies (2)

Hello,
I want to use a description for my parameter of my class method and that give this
[python]
class Player:
def __init__(self, name: str) -> ..... More

Print this item

  TreeView column headers
Posted by: TWB - Jan-28-2023, 09:18 PM - Forum: General Coding Help - Replies (2)

Hello all
I have posted a code section of a larger program where im trying to populate a a treeview with 2 columns and inset 2 values.
My issue is t..... More

Print this item

  Converting a json file to a dataframe with rows and columns
Posted by: eyavuz21 - Jan-28-2023, 08:13 PM - Forum: General Coding Help - Replies (13)

Hey all,

I am trying to convert a json file into a dataframe.

[python]import pandas as pd
import os
from pandas.io.json import json_..... More

Print this item

  fixing error TypeError: 'float' object is not subscriptable
Posted by: programmingirl - Jan-28-2023, 07:47 PM - Forum: Homework - Replies (1)

Hi there. I am working on a project on loan defaults and I am trying to convert the term variable into 36 or 60 integer numeric data type using .apply..... More

Print this item

  help how to get size of pandas dataframe into MB\GB
Posted by: mg24 - Jan-28-2023, 09:13 AM - Forum: General Coding Help - Replies (1)

Hi Team,

I want to convert memory usage of DataFrame into MB OR GB. in a Pythonic way.

below value I want to get size 19647323

[python]
import pa..... More

Print this item

  [SOLVED] [sqilte3] Check if column not empty?
Posted by: Winfried - Jan-28-2023, 03:44 AM - Forum: General Coding Help - Replies (5)

Hello,

Some rows might have an empty column.

How can I check it's filled with data?

[python]file = open("output.txt", 'at',encoding='utf-8')..... More

Print this item

  Issues with Anaconda installation...
Posted by: bytecrunch - Jan-27-2023, 11:29 PM - Forum: Data Science - Replies (2)

Hello,

I have downloaded Anaconda on a new Windows 10 machine. The installer did everything without errors BUT I still don’t see Anaconda in the St..... More


Attached Files

Thumbnail(s)
   
Print this item

  splitting a Dataframe Column in two parts
Posted by: nafshar - Jan-27-2023, 07:17 PM - Forum: General Coding Help - Replies (2)

I have a dataframe column for emal addresses and I am trying to find the count of the top domains.
I am sppliting the email using the '@" as the sep..... More

Print this item

  How to predict Total Hours needed with List as Input?
Posted by: caninan - Jan-27-2023, 04:20 PM - Forum: Data Science - No Replies

I am struggling with the problem I am facing: I have a dataset of different products (Cars) that have certain Work Orders open at a given time. I know..... More


Attached Files

Thumbnail(s)
   
Print this item

  [SOLVED] Epoch timestamp without milliseconds?
Posted by: Winfried - Jan-27-2023, 03:36 PM - Forum: General Coding Help - Replies (5)

Hello,

What's a good way to get an Epoch timestamp without the milliseconds?

[python]for row in cur.execute("SELECT id,created,title FROM conten..... More

Print this item

  How to auto align x-axis label
Posted by: SamLiu - Jan-27-2023, 02:15 PM - Forum: General Coding Help - Replies (2)

Hi all,

A matplotlib plt.bar demo create a chart as snapshots, how to set up x-axis label no shadow,thanks!!

[python]
import matplotlib.pyplot ..... More

Print this item

  Global variables or local accessible
Posted by: caslor - Jan-27-2023, 11:58 AM - Forum: General Coding Help - Replies (4)

Hi to all, allow me a small intro : i am self taught in programing , first learn to program in "c" (arduino) and later playing with a raspberry pi boa..... More

Print this item

  scraping code misses listings
Posted by: kolarmi19 - Jan-27-2023, 10:00 AM - Forum: Web Scraping & Web Development - No Replies

Hey everyone
i've got this python scraping code made for me that worked perfect few months but lately it miss some parameters while scraping.
you ca..... More

Print this item

  Do not get how Python iterates over a file
Posted by: tester_V - Jan-27-2023, 06:32 AM - Forum: General Coding Help - Replies (12)

Greetings!
I’m writing Python snippets here and there but I could never understand how Python iterates over a file.
It is kind of a mystery, a black..... More

Print this item

  Error when using FIND
Posted by: WJSwan - Jan-27-2023, 05:36 AM - Forum: General Coding Help - Replies (2)

I am trying to find a string in a text file and get an error on the first find statement.
[python]
xrefstart=irec.find("\x - \xo ")
..... More

Print this item

  Change a numpy array to a dataframe
Posted by: Led_Zeppelin - Jan-26-2023, 06:34 PM - Forum: General Coding Help - Replies (3)

As anyone can see from the attached screenshot after I scaled a dataframe, it is now a numpyndarray. That would make it hard to save. SO how do I conv..... More


Attached Files

Thumbnail(s)
   
Print this item

  SagaSim [ongoing project] - short summary
Posted by: Kamos5 - Jan-26-2023, 01:59 PM - Forum: Code Review - No Replies

Hi all. :)

I'm creating in my free time a simulation that was inspired by multiple sources (thelifeengine, crusader king II/III, dwarf fortress or li..... More


Attached Files

Thumbnail(s)
           
Print this item

  How to read in mulitple files efficiently
Posted by: garynewport - Jan-26-2023, 10:23 AM - Forum: General Coding Help - Replies (3)

I have multiple files, all containing 10s of thousands of lines of data. I cannot alter the way the data is presented and it appears as seen in the at..... More


Attached Files

Thumbnail(s)
   
Print this item

  I'm trying to figure out if this is a bug from a simple quiz at Future Skill
Posted by: fabstr1 - Jan-25-2023, 02:36 PM - Forum: Homework - Replies (3)

I'm working through a simple python tutorial and I don't know why I can't get enough point to finish the quiz.

My quiz is,

"

Comparing float ..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  Two arguments in input fu... 8 hours ago Alfredd noisefloor General Codin...
  Backward compatibility qu... 10 hours ago yutaozhou buran News and Disc...
  [Tkinter] I’m building a ... Yesterday, 19:29 tsgiannis tsgiannis GUI
  [openpyxl] Set the lockin... Yesterday, 11:59 BelleroDev Pedroski55 General Codin...
  New Users Introduce Yours... Yesterday, 09:09 Yoriz BelleroDev Bar
  Best book on learning Pyt... Yesterday, 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
  Can I develop a live vide... 11-05, 08:31 mtrkhan ankitsharma32 Web Scraping ...
  [SOLVED] Linefeed when wr... 11-04, 11:51 Winfried buran General Codin...
Most views
  The best Prog... 578681
  Tutorial Requ... 509086
  Web Scraping ... 441836
  Newbie with P... 385787
  New Users Int... 375040
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 24
metulburr 6
python 6
NonEntity 5
buran 3
Newest members
Cristiano Today
Alfredd Today
clayote Today
yutaozhou Yesterday
EchoFlowar3Dip Yesterday

User Panel Messages

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