Pandas - how can I calculate a field to count the number of occurences that values in the ID field appear in sequential order
Welcome to Data Science! Here I create your data frame and show one way to create the column you need. I use numpy in addition to pandas:

import pandas as pd
import numpy as np

# Create df
ID = ['bike', 'bike', 'car', 'car', 'car']
Color = ['red', 'black', 'green', 'orange', 'blue']
df = pd.DataFrame(data={'ID': ID, 'Color': Color})


Add a new column called 'Order', with counts based on each group - these are mini dataframes that contain only one of the ID values only. This makes use of the groupby method on a Pandas dataframe.

df['Order'] = df.groupby('ID').transform(lambda x: 1 + np.arange(len(x)))


The transform method takes a function and applies it to each group. I use an anonymous function (just a function with no name), also called lambda functions, using the keyword lambda.

The result:

    Color    ID  Order
0     red  bike      1
1   black  bike      2
2   green   car      1
3  orange   car      2
4    blue   car      3




As anymous.asker mentioned, it would be helpful in the future if you post the code that creates your dataframe!