Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and appears to be fixed. Will keep monitoring.


devel / comp.lang.python / Re: Fwd: Can you help me with this Python question?

SubjectAuthor
o Re: Fwd: Can you help me with this Python question?Axy

1
Re: Fwd: Can you help me with this Python question?

<mailman.702.1665683272.20444.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19895&group=comp.lang.python#19895

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: axy...@declassed.art (Axy)
Newsgroups: comp.lang.python
Subject: Re: Fwd: Can you help me with this Python question?
Date: Thu, 13 Oct 2022 18:47:32 +0100
Lines: 29
Message-ID: <mailman.702.1665683272.20444.python-list@python.org>
References: <CAGHEfn_YiuMAQMa=LTO2cnu2X1guJsme92q6=qUMiTL3pVhTqQ@mail.gmail.com>
<CAGHEfn_eDB=NbauMnZ7Vj_9OruxLaWiMNCdUj+DRxaRo80hdBg@mail.gmail.com>
<81adae8f-92c1-4a35-581f-fc9f4e72b94d@declassed.art>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de rzxDHdVuGGTp2zOHo531BgNjZpUt/rc4Kj41Z1NtSrYg==
Return-Path: <axy@declassed.art>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=declassed.art header.i=@declassed.art header.b=MEcJ6DRu;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.032
X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'this:': 0.03; 'variable':
0.05; 'dataframe': 0.09; 'obviously,': 0.09; 'pandas': 0.09;
'values.': 0.09; 'subject:Python': 0.12; 'column': 0.16;
'columns': 0.16; 'dataframe.': 0.16; 'iterate': 0.16; 'wrote:':
0.16; 'python': 0.16; 'subject:question': 0.17; 'values': 0.17;
'to:addr:python-list': 0.20; 'code': 0.23; 'subject:Fwd': 0.26;
'task': 0.26; 'header:User-Agent:1': 0.30; 'returning': 0.32;
'subject:Can': 0.32; 'header:In-Reply-To:1': 0.34; 'final': 0.35;
'missing': 0.37; 'class': 0.37; 'single': 0.39; 'edit': 0.39;
'use': 0.39; 'search': 0.61; 'your': 0.64; 'look': 0.65;
'subject:this': 0.67; 'below': 0.69; "you'll": 0.73; 'quick':
0.77; 'returned': 0.81; 'extra': 0.84; 'subject:you': 0.84;
'answer!': 0.84; 'challenge,': 0.84; 'will,': 0.91
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Content-Language: en-US
In-Reply-To: <CAGHEfn_eDB=NbauMnZ7Vj_9OruxLaWiMNCdUj+DRxaRo80hdBg@mail.gmail.com>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=declassed.art;
i=@declassed.art; q=dns/txt; s=20210603; t=1665683259; h=message-id :
date : mime-version : subject : to : references : from : in-reply-to :
content-type : content-transfer-encoding : from;
bh=3S94NfEC1SlavjkPQfalvrXeXOg/+D9zXv7ej68XpOQ=;
b=MEcJ6DRueeyzRneFaoJs/NkDFO9bcMhchQrdFG4YmbhjTc2CqT1hfvdmksUkqQTc7qEON
O8YxyMB24y5VPpfrXNBk45TATRm8gxDedx2ABzcpz69J5SOTn9Z6LK6YMblqo/8yFJOU+C6
MrgBfe5fpfnuh/eilq+I6d42XyefFcA7FxRDMjknIcdRt2Xc/03w7s91cYDhIG9HIZy9apS
QST4sGvO0rrrt6F8Rk4nYO5JHHvx5/vyyRiKwLbaX0w2TqI0Mzo73do6lMXBNGtzDIQW6yo
KMAXG0qL1LCIN3w6kuJ+2OuikW9Pew3rdwowBk7UJXY7MRADv06V/XEUFDqA==
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <81adae8f-92c1-4a35-581f-fc9f4e72b94d@declassed.art>
X-Mailman-Original-References: <CAGHEfn_YiuMAQMa=LTO2cnu2X1guJsme92q6=qUMiTL3pVhTqQ@mail.gmail.com>
<CAGHEfn_eDB=NbauMnZ7Vj_9OruxLaWiMNCdUj+DRxaRo80hdBg@mail.gmail.com>
 by: Axy - Thu, 13 Oct 2022 17:47 UTC

Well, although I never used pandas and never will, if that's about
artworks, that's mine.

Obviously, you need to iterate columns and sum values returned by the
snippet you provided. A quick search tells us to use colums property.
So, it might look like this:

na_sum = sum(df[name].isnull().sum() for name in df.columns)

Axy

On 13/10/2022 13:44, Sarah Wallace wrote:
> For a python class I am taking..
>
> In this challenge, you'll be working with a DataFrame that contains data
> about artworks, and it contains many missing values.
>
> Your task is to create a variable called na_sum that contains the total
> number of missing values in the DataFrame. When that's completed, print out
> your answer!
>
> Hint: The code given below will give you the number of missing (NaN) values
> for the *Name* column in the DataFrame. How would you edit the code to get
> the missing values for every column in the DataFrame?
> Extra hint: You'll be returning a single number which is the final sum() of
> everything.
>
> df['Name'].isnull().sum()
>

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor