I am a coder . I want to write a function like

def process(dataframe, preiods=7, freq='hour') :

It can process dataframe by every preiods of freq .

But I think preiods is not a good word at here, preiods(plural preiod) looks stange too .

Do I use period correctly? If not, any good idea ?

closed as off-topic by StoneyB, Davo, ColleenV Jan 23 at 13:08

  • This question does not appear to be about learning the English language within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    I'm voting to close this question as off-topic because it asks for a variable name. – StoneyB Jan 23 at 11:13

I will answer the underlying language question. What to name your variables may be governed by the naming conventions of the shop or the programming language.

The preposition by is not idiomatic in that locution. We say that something should happen every seven hours or every two minutes not "by every".

Your program is giving the caller the ability to specify the type of interval (hours, minutes, days, etc) and the length of the interval. We can call "hours" and "minutes" an interval or an interval type, and "seven" a "length" or a "frequency".

We want this to happen every {frequency} {interval type}.

Phone me every ten minutes.

Push this button every sixty seconds.

Send me an invoice every three months.

Not the answer you're looking for? Browse other questions tagged or ask your own question.