def f(s):
res_int = ''.join(i if i.isdigit() else ' ' for i in s).split()
average = sum(map(int, res_int)) / len(res_int)
limit = 70
res_str = ''
for i in s:
if i.isalpha():
res_str = ''.join([res_str, i])
if average > limit:
return f'{res_str},{average}'
else:
return False
s = 'a,100,150,200'
print(f(s))
2024-08-10 18:36:39 us=22255 library versions: OpenSSL 3.0.2 15 Mar 2022, LZO 2.10
2024-08-10 18:36:39 us=22476 net_route_v4_best_gw query: dst 0.0.0.0
2024-08-10 18:36:39 us=26229 net_route_v4_best_gw result: via 192.168.8.1 dev enp3s0
2024-08-10 18:36:39 us=27470 Diffie-Hellman initialized with 2048 bit key
2024-08-10 18:36:39 us=30236 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
2024-08-10 18:36:39 us=30280 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
2024-08-10 18:36:39 us=30295 TLS-Auth MTU parms [ L:1622 D:1184 EF:66 EB:0 ET:0 EL:3 ]
2024-08-10 18:36:39 us=30317 net_route_v4_best_gw query: dst 0.0.0.0
2024-08-10 18:36:39 us=30451 net_route_v4_best_gw result: via 192.168.8.1 dev enp3s0
2024-08-10 18:36:39 us=30492 ROUTE_GATEWAY 192.168.8.1/255.255.255.0 IFACE=enp3s0 HWADDR=fa:16:3e:d2:7e:1b
2024-08-10 18:36:39 us=34217 TUN/TAP device tun0 opened
2024-08-10 18:36:39 us=34248 do_ifconfig, ipv4=1, ipv6=0
2024-08-10 18:36:39 us=34273 net_iface_mtu_set: mtu 1500 for tun0
2024-08-10 18:36:39 us=34315 net_iface_up: set tun0 up
2024-08-10 18:36:39 us=37890 net_addr_ptp_v4_add: 172.16.10.1 peer 172.16.10.2 dev tun0
2024-08-10 18:36:39 us=39226 net_route_v4_add: 172.16.10.0/24 via 172.16.10.2 dev [NULL] table 0 metric -1
2024-08-10 18:36:39 us=39341 Data Channel MTU parms [ L:1622 D:1620 EF:122 EB:406 ET:0 EL:3 ]
2024-08-10 18:36:39 us=39357 Could not determine IPv4/IPv6 protocol. Using AF_INET
2024-08-10 18:36:39 us=39373 Socket Buffers: R=[212992->212992] S=[212992->212992]
2024-08-10 18:36:39 us=39391 UDPv4 link local (bound): [AF_INET]192.168.8.4:443
2024-08-10 18:36:39 us=39397 UDPv4 link remote: [AF_UNSPEC]
2024-08-10 18:36:39 us=39415 MULTI: multi_init called, r=256 v=256
2024-08-10 18:36:39 us=39455 IFCONFIG POOL IPv4: base=172.16.10.4 size=62
2024-08-10 18:36:39 us=39472 ifconfig_pool_read(), in='cubinez85,172.16.10.4,'
2024-08-10 18:36:39 us=39482 succeeded -> ifconfig_pool_set(hand=0)
2024-08-10 18:36:39 us=39489 IFCONFIG POOL LIST
2024-08-10 18:36:39 us=39495 cubinez85,172.16.10.4,
2024-08-10 18:36:39 us=39561 Initialization Sequence Completed
~$ sudo cat /var/log/openvpn/openvpn-status.log
OpenVPN CLIENT LIST
Updated,2024-08-10 15:59:21
Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
ROUTING TABLE
Virtual Address,Common Name,Real Address,Last Ref
GLOBAL STATS
Max bcast/mcast queue length,0
END
elastic_transport.TlsError: TLS error caused by: TlsError(TLS error caused by: SSLError([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1007)))
df.rename(columns={'old',:'new'})
это если переименовать конкретные колонки, а если "списком" - то читать исходник сindex_col=0
?