NOVELTY - The apparatus has water scrubber unit (20) provided with absorption column (21), flash column (22) and desorption column (23) and integrated with membrane unit (10) for purification/separation/enrichment of a gas or biogas containing significant amount of methane and carbon dioxide. The water separation unit (12), hydrogen sulfide separation unit (13) and particle and other contaminant separation unit (14) are operated, so that residue gas stream (3) is departed and purified gas stream (4) is led to water scrubber unit, energy for cooling and pumping of re-circulating water flow through columns is dropped and capacity for production of upgraded biogas (5) is increased.    USE - Apparatus for removing carbon dioxide from biogas and methane containing gas mixture.    ADVANTAGE - The production capacity of upgraded biogas of water scrubber unit is increased by operating separation units for water, hydrogen sulfide and contaminant, so that residue gas stream is departed and purified gas stream is led to water scrubber unit. Since the water scrubber unit is integrated with membrane unit, the methane losses are reduced, production capacity of upgraded biogas is increased and energy consumption is reduced.    DETAILED DESCRIPTION - The water scrubber unit is for provided for purification/separation/enrichment of gas or biogas containing methane and carbon dioxide. The incoming gas stream (1) is merged with flash gas stream (24) from flash column, pressurized in compressor (30) and then led into membrane unit for separation of carbon dioxide in membrane (11). The pressure in flash column is lowered without reduction of production capacity of upgraded biogas in absorption column and energy use for cooling and pumping of re-circulating water flow through columns is increased, so that methane loss is decreased. The flash gas stream from flash column in water scrubber unit is led to membrane unit for separation of carbon dioxide in membrane lib, so that residue gas stream is departed and methane-rich gas stream merged with gas stream is pressurized in compressor and then led into membrane unit for separation of carbon dioxide in membrane.    DESCRIPTION OF DRAWING(S) - The drawing shows a schematic view of the apparatus for removing carbon dioxide from gas.    Incoming gas stream (1)    Residue gas stream (3)    Purified gas stream (4)    Upgraded biogas (5)    Membrane unit (10)    Membrane (11)    Water separation unit (12)    Hydrogen sulfide separation unit (13)    Particle and other contaminant separation unit (14)    Water scrubber unit (20)    Absorption column (21)    Flash column (22)    Desorption column (23)    Flash gas stream (24)