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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 19,549
» Latest member: RodneyTen
» Forum threads: 38,592
» Forum posts: 174,856

Full Statistics

Online Users
There are currently 501 online users.
» 1 Member(s) | 490 Guest(s)
Yandex, Bing, Google, Facebook, Applebot, Baidu, deanhystad

Latest Threads
Error without reason
Forum: General Coding Help
Last Post: deanhystad
2 minutes ago
» Replies: 3
» Views: 92
[SOLVED] Open file, and i...
Forum: General Coding Help
Last Post: Pedroski55
13 minutes ago
» Replies: 1
» Views: 67
Nested Dictionaries, good...
Forum: General Coding Help
Last Post: Curbie
3 hours ago
» Replies: 2
» Views: 209
Dichaelmag
Forum: General Coding Help
Last Post: TimsothyKat
3 hours ago
» Replies: 0
» Views: 41
Enhancement for Python’s ...
Forum: Code sharing
Last Post: 14mhz
Today, 12:30 AM
» Replies: 0
» Views: 186
Error on import: SyntaxEr...
Forum: General Coding Help
Last Post: deanhystad
Yesterday, 01:55 PM
» Replies: 10
» Views: 21,690
Picamera2 add text to cam...
Forum: General Coding Help
Last Post: GigiG
Yesterday, 11:46 AM
» Replies: 0
» Views: 109
Functions: why use a vari...
Forum: General Coding Help
Last Post: DeaD_EyE
Yesterday, 05:55 AM
» Replies: 3
» Views: 277
PYTHONHOME Variable corre...
Forum: General Coding Help
Last Post: msetzerii
May-25-2025, 11:48 PM
» Replies: 0
» Views: 149
Best way to pass data to ...
Forum: Game Development
Last Post: RogereK
May-25-2025, 06:39 AM
» Replies: 7
» Views: 5,166

 
  Converting cells in excel to JSON format
Posted by: desmondtay - May-19-2022, 10:10 AM - Forum: General Coding Help - Replies (4)

Hi,

I am new to Python, need some help from the experts. I need to convert certain cells in 2 worksheets in excel to JSON format. How can i do it u..... More

Print this item

  do you have an idea to optimize this code[recursion]]?
Posted by: netanelst - May-19-2022, 08:37 AM - Forum: General Coding Help - Replies (4)

[python]class y():


def __init__(self, id, d="", indicator="",type="",deleted=False,published_date=0,last_updated=0,reports=[],actors=[],..... More

Print this item

  do you have an idea for optimizing this code?
Posted by: netanelst - May-19-2022, 07:12 AM - Forum: General Coding Help - Replies (3)

[python]
ip=0
import html
from imp import C_EXTENSION
import pandas as pd
from werkzeug import utils
from asyncio import get_running_loop
from..... More

Print this item

Bug do you have an idea to optimize this code[recursion]]?
Posted by: netanelst - May-19-2022, 06:50 AM - Forum: Code Review - No Replies

thanks
netanel

[python]class l():
def __init__(self,name,created_on,last_valid_on):
self.name=name
self.created_on=created_..... More

Print this item

  I am trying to run pytest and getting error that doesn't show up when running pytest.
Posted by: uobouhb - May-19-2022, 03:01 AM - Forum: Web Scraping & Web Development - Replies (1)

Hi,

This is in python flask.

I am getting an error in pytest. When I run pytest it says it is working but I get the output below
[output]app\t..... More

Print this item

  [Solved]Help displaying SQLite Database
Posted by: Extra - May-19-2022, 01:19 AM - Forum: GUI - Replies (9)

Hello,

I'm trying to display my database on my TableWidgetItem in PyQt.

This is a snippet of my SQLite part of the code:
[python]
#---..... More

Print this item

  Get input for reading DB and refreshing plotly.graph_objects
Posted by: michel77777 - May-18-2022, 08:51 PM - Forum: GUI - Replies (1)

Hi,

there is a simple Python appilaction, which reads data from SQL database and shows the result as plotly.graph_objects.

I want the get two val..... More

Print this item

  NameError: name 'self' is not defined
Posted by: walter - May-18-2022, 02:31 PM - Forum: Code Review - Replies (11)

Hi guys,
i am a newbie in Python. I have a problem with an OOP issue. This is my code

[python]class Solution:
def __init__(self):
se..... More

Print this item

  trying to recall a regex for re.split()
Posted by: Skaperen - May-18-2022, 09:56 AM - Forum: General Coding Help - Replies (23)

i can't find where this was and can't recall it. regex stuff still doesn't sink in.

what i am wanting to do is split with all leading decimal digi..... More

Print this item

  how to parse this array with pandas?
Posted by: netanelst - May-18-2022, 09:26 AM - Forum: General Coding Help - Replies (2)

i glad for any help because I tried without succeed



I attached link to data in array:
https://pastebin.com/WnQMnn54

thanks
netanel

Print this item

  pysftp connection issue
Posted by: geil007 - May-18-2022, 08:40 AM - Forum: General Coding Help - No Replies

hi all,

i am trying to connect to an AWS hosted SFTP server from my Azure Databricks Notebook.

[python]import pysftp as sftp
from base64 import..... More

Print this item

  python update binary object (override delivered Object properties)
Posted by: pierre38 - May-17-2022, 03:30 PM - Forum: General Coding Help - Replies (4)

Hello,
I did many trials without success. I need to have flexibility in my Python code, so I use already .yaml configuration for deliverable scripts ..... More

Print this item

  how to parse this array with pandas?
Posted by: netanelst - May-17-2022, 12:30 PM - Forum: Data Science - Replies (1)

i glad for any help because I tried without succeed



I attached link to data in array:
https://pastebin.com/WnQMnn54

thanks
netanel

Print this item

  Populating an array dynamically
Posted by: zxcv101 - May-17-2022, 10:40 AM - Forum: General Coding Help - Replies (1)

Hi guys - am new to Python, so if my questions seem basic, pls bear with me.

I have a script which returns rows of data in this format :

2022051..... More

Print this item

  ValueError: Length mismatch: Expected axis has 8 elements, new values have 1 elements
Posted by: ilknurg - May-17-2022, 08:50 AM - Forum: General Coding Help - Replies (1)

[python]import mysql.connector
import pandas as pd


def to_camel_case(col_name: str) -> str:
#""function to convert column names to camel c..... More

Print this item

  Mysql Syntax error in pymysql
Posted by: ilknurg - May-17-2022, 07:43 AM - Forum: General Coding Help - Replies (4)

I have the code below for migration from mysql to postgresql.

[python]def get_mysql_connection(database_name: Optional[str] = None) -> MysqlConnect..... More

Print this item

  break out of for loop?
Posted by: User3000 - May-16-2022, 07:48 PM - Forum: General Coding Help - Replies (3)

hi, I am using Kodi and I have my movies in different folders depending on the resolution, refresh rate and available soundtrack (like Dolby Atmos, DD..... More

Print this item

  How to avoid the extra set of y-axis labels?
Posted by: Mark17 - May-16-2022, 06:48 PM - Forum: General Coding Help - Replies (9)

This programs works fine:

[Python]
import matplotlib.pyplot as plt

sample_data = [[3000,18], [3200,17], [3500,16], [4000,12]]
sample_df = pd.D..... More

Print this item

  Why the NameError?
Posted by: Mark17 - May-16-2022, 02:27 PM - Forum: General Coding Help - Replies (4)

Hi all,

In Jupyter Notebook I ran these cells:

[Python]
sample_data = [[3000,18], [3200,17], [3500,16], [4000,12]]
sample_df = pd.DataFrame(sa..... More

Print this item

  importing functions from a separate python file in a separate directory
Posted by: Scordomaniac - May-16-2022, 01:44 PM - Forum: General Coding Help - Replies (3)

So I can easily call a function from a file in the same directory as the one i'm running:
[python]from functestsetup import functest
functest()
[/p..... More

Print this item

  I have an issue with Netmiko Error reading SSH protocol banner
Posted by: omarhegazy - May-16-2022, 11:54 AM - Forum: General Coding Help - Replies (2)

I wrote a code to go through an inventory list of Cisco devices and do some tasks. My problem is because the inventory list is huge, and no guarantee ..... More

Print this item

Question Program: Assign roles to players depending on priorities
Posted by: raquel86 - May-16-2022, 11:10 AM - Forum: Homework - No Replies

Hi!
I'm new in the forum and I hope this is the right place to ask this. I need guidance to develop a program in Python. I wouldn't exactly need the ..... More

Print this item

  listbox selection
Posted by: DPaul - May-16-2022, 09:30 AM - Forum: GUI - Replies (4)

Hi,
I have a listbox for MULTIPLE selection.

def getElement(event):
    selection = event.widget.curselection()
the variable "sel..... More

Print this item

  Make Random Choices the same [SOLVED]
Posted by: AlphaInc - May-16-2022, 09:17 AM - Forum: General Coding Help - Replies (6)

Hello everybody,

I wanted to set up a list of strings and print one randomly.
This was really easy to set up:
[python]
#Random Variables
myList..... More

Print this item

  Passionate Python developer from India "waiting" :/ to get hired
Posted by: sunando_samaddar - May-16-2022, 07:20 AM - Forum: Jobs - Replies (3)

Hi, I've been struggling, and struggling, and struggling in my city, Kolkata, for the last 8 years. Sad It's time I need somebody who can hire me..... More


Attached Files

.pdf   resume052022.pdf (Size: 76.12 KB / Downloads: 3)
Print this item

  Refresh token for Wyze SDK
Posted by: duckredbeard - May-16-2022, 04:33 AM - Forum: General Coding Help - No Replies

I have added a few Wyze smart bulbs to my home security system, running them on their own program but using door sensors from the security program. E..... More

Print this item

  Mixed types of numeric data in the statistics module
Posted by: stevendaprano - May-16-2022, 02:49 AM - Forum: News and Discussions - Replies (2)

Users of the statistics module, how often do you use it with heterogeneous data (mixed numeric types)?

Currently most of the functions try hard to ..... More

Print this item

  How to instantly update the plot by getting values from a Scale widget?
Posted by: OLE - May-15-2022, 09:30 PM - Forum: GUI - Replies (20)

I have a 3d grid system of 3*4*10 grids (nx*ny*nz), and I have assigned a random value to each grid. I want to plot different surfaces o..... More

Print this item

  How do I solve the second problem?
Posted by: Cranberry - May-15-2022, 05:37 PM - Forum: General Coding Help - Replies (1)

I'm stuck, I'm looking to know how to do the Second Problem. I'll share what I have for the first problem in hopes of getting help with the sec..... More

Print this item

  Problem with searching over Beautiful Soap object
Posted by: Pavel_47 - May-15-2022, 09:37 AM - Forum: Web Scraping & Web Development - Replies (30)

Hello,

Here is BS object where I want to extract "publisher" value.
The value I want to extract is [b]Springer; 1st ed. 2020 edition (April 27, 20..... More

Print this item

  QAbstractTableModel: Indexing a list of dictionaries
Posted by: BigMan - May-15-2022, 03:47 AM - Forum: GUI - Replies (1)

Hi,

I have a list of dictionaires. Something like that:

[python]
addressbook = []
address_1 = {"city": "Berlin", street": "Alexanderplatz"}
a..... More

Print this item

  (OpenCV) Help to improve code for object detection and finding center of it
Posted by: saoko - May-14-2022, 05:34 PM - Forum: General Coding Help - No Replies

Hello. I'm writing the code to find contours and extract the bounding rectangle coordinates, then find center coordinate and draw center point. But I'..... More

Print this item

  Help with passing values in npyscreen
Posted by: Extra - May-14-2022, 02:25 PM - Forum: General Coding Help - Replies (8)

Hello,

I'm playing around with npyscreen to make my terminal application look nicer and be more user friendly.
I'm trying to take in the user's in..... More

Print this item

  error
Posted by: muratuzun - May-14-2022, 02:17 PM - Forum: General Coding Help - Replies (1)

Hello,

When I run the csv file data I have with the following command, I get an error. I wonder if I got this from a ready-made command? What shoul..... More

Print this item

  Web scraping for search results
Posted by: JOE - May-14-2022, 06:32 AM - Forum: Web Scraping & Web Development - Replies (7)

Hi , I was trying to extract search results but has the error "AttributeError: 'list' object has no attribute 'text'[/output]"

Please suggest.

[..... More


Attached Files

Thumbnail(s)
   
Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  Error without reason 2 minutes ago Azdaghost deanhystad General Codin...
  [SOLVED] Open file, and i... 13 minutes ago Winfried Pedroski55 General Codin...
  Nested Dictionaries, good... 3 hours ago Curbie Curbie General Codin...
  Dichaelmag 3 hours ago TimsothyKat TimsothyKat General Codin...
  Enhancement for Python’s ... Today, 00:30 14mhz 14mhz Code sharing
  Error on import: SyntaxEr... Yesterday, 13:55 kirkwilliams2049 deanhystad General Codin...
  Picamera2 add text to cam... Yesterday, 11:46 GigiG GigiG General Codin...
  Functions: why use a vari... Yesterday, 05:55 MMartin71 DeaD_EyE General Codin...
  PYTHONHOME Variable corre... 05-25, 23:48 msetzerii msetzerii General Codin...
  [PyGame] Best way to pass... 05-25, 06:39 Milosz RogereK Game Developm...
  Is Python used to make po... 05-24, 04:17 ironsheep RogereK Game Developm...
Most views
  The best Prog... 569350
  Tutorial Requ... 472607
  Web Scraping ... 434026
  Newbie with P... 373966
  Thread remain... 345959
Most reputation
buran 580
snippsat 506
Larz60+ 452
Gribouillis 362
deanhystad 327
Most replies
  New Users Int... 449
  [book] Variou... 188
  CKEditor / Ri... 100
  moving from t... 95
  Free keys and... 91
Top posters
Larz60+ 12053
buran 8172
snippsat 7328
deanhystad 6831
metulburr 5151
Top referrers
Googlepro 22
python 6
metulburr 6
NonEntity 5
buran 3
Newest members
RodneyTen Today
TimsothyKat Today
Stobi Today
Prekshit Today
Ellon8121 Today

User Panel Messages

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