english_words = ['Cat', 'Dog', 'Parrot']
russian_words = ['Кошка', 'Собака', 'Попугай']
for id, russian in enumerate(russian_words):
english = english_words[id]
print(f'Русское: {russian} / Английское {english}')
def wait_new_file(path_to_watch):
print('Ждем появления файла в папке сохранения')
before = dict ([(f, None) for f in os.listdir (path_to_watch)])
result = True
while result:
time.sleep (10)
after = dict ([(f, None) for f in os.listdir (path_to_watch)])
added = [f for f in after if not f in before]
removed = [f for f in before if not f in after]
if added:
print("Добавлено: ", ", ".join (added))
result = False
if removed: print("Удалено: ", ", ".join (removed))
before = after
return added
writer = pd.ExcelWriter(fullpathtosave)
df.to_excel(writer,'Sheet1',index=False)
writer.save()
from testpackage.subtestpackage.subtestmodule import subtestfunc, Subtestclass, anotherfunc
a = subtestfunc()
b = Subtestclass()
c = anotherfunc()
from testpackage.subtestpackage import subtestmodule as sm
a = sm.subtestfunc()
b = sm.Subtestclass()
c = sm.anotherfunc()
import pandas
df = pandas.DataFrame()
df['группы'] = ['a', 'a', 'a', 'b', 'b', 'c', 'c', 'c', 'c', 'd', 'd']
df['ящиков'] = [1, 11, 3, 11, 5, 6, 11, 8, 9, 10, 11]
df['ситуация'] = [0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1]
print(df[df['ситуация'] == 1].groupby('группы').count())
print(df[df['ситуация'] == 0].groupby('группы').sum())
print(“Hello”)
python c:\Coding\start.py