a=10000000000
print('{0:,}'.format(a).replace(',', ' '))
10 000 000 000
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
ds=[
['14.06.2022 00:00', 1],
['14.06.2022 06:00', 2],
['14.06.2022 12:00', 3],
['14.06.2022 18:00', 4],
['15.06.2022 00:00', 1],
['15.06.2022 06:00', 2],
['15.06.2022 12:00', 3],
['15.06.2022 18:00', 4],
['16.06.2022 00:00', 1],
['16.06.2022 06:00', 2],
['16.06.2022 12:00', 3],
['16.06.2022 18:00', 4]
]
df=pd.DataFrame(ds,columns=['D','A'])
df['D']=pd.to_datetime(df['D'])
df.set_index('D',inplace=True)
ax=df.plot()
ax.xaxis.set_minor_locator(MultipleLocator(6))
import warnings
warnings.filterwarnings("ignore")
import warnings
def fxn():
warnings.warn("deprecated", DeprecationWarning)
with warnings.catch_warnings():
warnings.simplefilter("ignore")
fxn()
python -W ignore foo.py
lt_1=['111111;dflgkdkfg','222222;DFLKDFG','33333;dfgdfgdfgdfg','4444444;xxxxxxxxx','666666;ttt']
lt_2=['555555;dflgkdkfg','222222;fgdfgdfgdfgdfgdfgdfg','4444444;dfgdfgdfgdfg','555555;yyy']
lt_3=[]
for unit1 in lt_1:
for unit2 in lt_2:
if unit1.split(';')[0]==unit2.split(';')[0]:
lt_3.append(unit1)
print(lt_3)
['222222;DFLKDFG', '4444444;xxxxxxxxx']
lt_22=[unit2.split(';')[0] for unit2 in lt_2]
for unit1 in lt_1:
if unit1.split(';')[0] in lt_22:
lt_3.append(unit1)
lt_22=set([unit2.split(';')[0] for unit2 in lt_2])
if (x:=1)- ошибочны на обоих языках. А уж что вы хотели сказать вот этим:
x:float
y:float
y1:float
df=pd.DataFrame()
for i,unit in enumerate(filess):
df=df.append(pd.read_excel(unit), ignore_index=True)